Quantcast
Viewing all 41027 articles
Browse latest View live

Скорость Автоматизированного Гардероба: Отменно Для Любой Организации!


Inconsistency detected by ld.so: dl-close.c

Hello, I have an application that loads shared libraries with dlopen() and releases them by dlclose(). Once a shared library is loaded, I can access to its functions in a generic way. One of these shared library uses OpenCV to do some image processing such as resizing an image. The problem arises when my shared library is bound to OpenCV static libraries (it doesn't happen with OpenCV shared ones. The simple fact to load my shared library, even with no image processing call, gives the following error : > Inconsistency detected by ld.so: dl-close.c: 743: _dl_close: Assertion `map->l_init_called' failed! As the assertion fails, it calls exit() and stops the application. I know that dlclose should return an error rather than using the assert, but I can't explain why dlclose is unable to release the loaded libray in this context. Environment : Linux Debian 7 (Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.84-2 i686 GNU/Linux) OpenCV 3.2.0 built from sources (core, imgcodec, imgproc and jasper, jpeg, png, tiff from OpenCV) g++ (Debian 4.7.2-5) 4.7.2 Thank you for your answers Kind regards, Patrice.

Python training custom object detector using the HOG + Linear SVM

Hello. Im using Python and OpenCV on my raspberry pi 3 for some kind of object recognition. I want to do this by applying the HOG + Linear SVM framework for object detection. My problem is, that i need a dataset for training my detector.I would like to orientate on these five steps(from Pyimagesearch):

1. Extract HOG features from your positive training set.
2. Compute HOG feature vectors from your negative training set.
3. Train your Linear SVM.
4. Apply hard-negative mining.
5. Re-train your Linear SVM using the positive samples, negative samples, and hard-negative samples.
Has someone already made this and could help me? Is there some kind of documentation available? I would appreciate a step by step tutorial, but i already searched and found none.

I hope someone can help me. Kind regards.

I built opencv-2.4.13 in linux.but i made changes in code in cpp included in modules.would it rquire to rebuild the entire opencv code or that modified file?and how is it possible to built that modified file

I built opencv-2.4.13 in linux.but i made changes in code in cpp included in modules.would it rquire to rebuild the entire opencv code or that modified file?and how is it possible to built that modified file

7 Ways The Net Has Changed Advertising and marketing Forever.

In the spring of 2000, San Franciscans noticed what appeared like a guerrilla marketing campaign turning up on pathways all over the city. When all your regional information is up to day as well as validated as accurate, you should begin optimizing your content and also external web links for neighborhood importance. While a number of the SEO questions you should ask on your own are the same as any kind of firm, franchise business have a couple of added things to think about when updating and also creating SEO plans. If you desire your company to be displayed in the regional search outcomes, having a full as well as completely enhanced Google+ local page is necessary. In ordering for development to the top of positions you needed assisting from your neighborhood SEO Professional. Internet search engine follow Search Engine Optimization simply as meticulously as any type of individual else and constantly cut these systems off. Providing exposure to other neighborhood businesses as Podcast visitors aids you make great links.

A regional Search Engine Optimization company can give you with lots of sources that can be used to obtain wonderful web traffic for your site google penalty service. The Search Engine Optimization copywriter will invest a disproportionate amount of time creating the words (no more than 160 personalities, including spaces) for a Description Tag.Image may be NSFW.
Clik here to view.


Neighborhood schools commonly have sports sponsorship chances and area web sites typically have actually pages dedicated to local businesses that have actually made a contribution. Numerous years ago it was not truly all that essential whether a company placed well in the regional search results page, however that has actually altered significantly due to two major developments. When looking to ocnduct neighborhood Search Engine Optimization that are not usually needed for more basic key words, there are numerous things that must be taken into account. The author of this write-up describe about the important points regarding local Search Engine Optimization Method that is significantly valuable to improve your local keyword phrases and useful to draw in visitors in the direction of your company.


Be sure to seek the services of a local Search Engine Optimization company related to repute with more information on clients that've viewed achievement inside their projects. There are several unreliable black hat Search Engine Optimization business around, you need to be tough when choosing who to work with in order to avoid the Google black listing or losing cash on much less compared to preferable results.

Besides the address itself the title tag is something you really need to consider. According to the Neighborhood Search Position Aspects calling the City and State, besides your keyword phrase, in your web page title is one of the most important thing to do. A good layout would certainly be ", for example Shiny Teeth dental expert Rose city Oregon".

Camera pose from a moving camera

Hi I'm doing a drone landing software using opencv. I have 4 rectangles with different colors on the ground and I need the drone to land in the middle of the rectangles. I'm a newbie in opencv I would like if someone could point me in a way to getting the camera pose with one camera. Btw I'm using c++

On-line Poker India

India on-line poker and the nation's Internet rummy video games may not immediately seem to be related; while many individuals know that gin poker online india rummy has steadily been played for money, and even for high stakes, it is not a major a part of the web gambling landscape for much of the world. India has been struggling onerous to cope with issues of online playing, online gaming and online lotteries for long. You possibly can attempt your hand at Texas Maintain'em Poker, Pot Restrict Omaha Poker, Single Table Match Poker, Free Poker, Free roll Poker Tournaments, Sit N Go Poker, Ring Poker, Multi Desk Poker Tournaments, and rather more! India might claim that since John Joe is residing in India, it is India which has the jurisdiction. There are various extra techno legal points which can be merely ignored by on-line gaming and online gaming industry and stakeholders in India.

Image may be NSFW.
Clik here to view.
The banks and many others should ask them to first comply with relevant techno authorized compliances and then support their claims with a proper techno authorized consultancy from a reputed regulation firm. The corporate will probably be providing poker internet improvement solution that might be played by individuals visiting the respective websites. Up to now, Kerala refused permission to Future Gaming Options India Non-public Ltd to sell Nagaland lotteries within the state. Earlier than we begin our overview of the authorized background to real cash poker inside India, I am going to simply make a point out of some helpful poker pages here on winmoney101. Nagaland and Sikkim are so far the one states in India which has enacted a statute pertaining to online gaming i.e. Sikkim On-line Gaming (Regulation) Act, 2008 (Sikkim Gaming Act).

Whereas the court docket didn't rule out rummy as illegal, it declined to rule on the legality of the sport, even when played for real cash stakes. Over 50,000 individuals play online with these homegrown" online poker startups and ninety five % of India's skilled gamers are male. Nevertheless, there are some aberrations as properly relating to permitting use of Bitcoins for gaming and playing in U.S. It has been reported that two Las Vegas casinos would begin accepting virtual currency generally known as Bitcoins Nevertheless, this is a tricky state of affairs as use of Bitcoins is legally risky in many jurisdictions together with India. The choice of Indian Supreme Court docket could set up legality or illegality of online video games like rummy, poker, and so on. As soon as a desk is mastered, poker recreation players can quickly fold over and transfer their stakes to a different waiting desk.

Nonetheless, Part 14 of the Act supplies that nothing in the foregoing provisions of this Act shall be held to apply to any recreation of mere skill wherever played. Lastly, financial and taxation legislations like tax legal guidelines of India, anti money laundering legal guidelines, etc are additionally concerned while working online casinos, on-line gambling and betting and on-line gamming platforms. Though the Madras High Court docket has made reference to poker being a game of skill, there's a lack of a comprehensive judgment by the Supreme Court on the topic, and therefore, confusion prevails. In brief, the dealing in Bitcoins in India remains to be a grey space" and it isn't secure to consider it strictly legal". The state of Sikkim grants provisional and regular licence under the Sikkim On-line Gaming (Regulation) Act, 2008.

Founded in 2013, set its sights on turning into one of many foremost authorities in poker journalism. Ashkenazi estimated the Indian poker market to be between $eighty and $a hundred and fifty million per year. By playing on worldwide poker sites, gamers located in India can compete with others world wide for among the most lucrative real money on-line poker tournaments obtainable. The impact is obvious from the rise in demand for high quality game content material and India is not removed from world poker domination. Meanwhile, the law enforcement agencies of India have been working onerous to curb and punish on-line playing rackets and actions in India.

It is believed that the web gaming market in Singapore was value as much as SG$376 million (around US$299.6 million). Thanks for providing simple and trusted platform to play poker.I think the poker community owes it to poker4aces for conducting such excellent tourneys. Each on-line gaming and online playing market of India is quick booming and maturing Entrepreneurs in these fields have began exploring Indian markets to establish their ventures in India. As lots of the excessive-rollers do not divulge the source of the cash they spend playing, the casinos are additionally unable to maintain an account of the same," mentioned an I-T sleuth. Here's more info in regards to khelo365.com poker have a look at our webpage. Since poker india then, there have been several Indian court docket rulings pertaining to the status of poker.

How can I load my trained svm to a people detector on a video?

I'm trying to test a HOG detector with a SVM I trained and saved in an .xml file. The problem is I'm not understanding how can I load it to use it with detectMultiscale. Here is he code: int main () { VideoCapture cap("/path/"); // INCLUDE PATH TO VIDEO. if (!cap.isOpened()); return -1; Mat frame, gray, src; namedWindow("HOG test", CV_WINDOW_AUTOSIZE); while(true) { cap >> frame; cvtColor(frame, gray, CV_BGR2GRAY); // Change to grayscale equalizeHist(gray, src); // Equalize the video if (!src.data) continue; HOGDescriptor f; Ptr svm; svm = StatModel::load("detector_svm.xml"); f.setSVMDetector(svm); vector found, found_filtered; f.detectMultiScale(src, found, 0, Size(8,8), Size(32,32), 1.05, 2); size_t i, j; for (i=0; i= 0) break; } return 0; } And here are the errors on setSVMDetector. error: no matching function for call to ‘cv::HOGDescriptor::setSVMDetector(cv::Ptr&)’ f.setSVMDetector(svm); note: /usr/local/include/opencv2/objdetect.hpp:378:26: note: virtual void cv::HOGDescriptor::setSVMDetector(cv::InputArray) CV_WRAP virtual void setSVMDetector(InputArray _svmdetector); /usr/local/include/opencv2/objdetect.hpp:378:26: note: no known conversion for argument 1 from ‘cv::Ptr’ to ‘cv::InputArray {aka const cv::_InputArray&}’ Anynone can help?? Thank you a lot.

What is the retrieval method RETR_FLOODFILL?

When calling `cv::findContours()` the modes are documented, except for 1 called `RETR_FLOODFILL`. What does that one mean? - `CV_RETR_EXTERNAL` retrieves only the extreme outer contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1 for all the contours. - `CV_RETR_LIST` retrieves all of the contours without establishing any hierarchical relationships. - `CV_RETR_CCOMP` retrieves all of the contours and organizes them into a two-level hierarchy. At the top level, there are external boundaries of the components. At the second level, there are boundaries of the holes. If there is another contour inside a hole of a connected component, it is still put at the top level. - `CV_RETR_TREE` retrieves all of the contours and reconstructs a full hierarchy of nested contours. This full hierarchy is built and shown in the OpenCV contours.c demo. - `CV_RETR_FLOODFILL` ???

Молниеносность Автоматического Гардероба: Первоклассно Для Любой Организации!

Documentation warnings w/ Xcode?

I'm using a pre-built OpenCV with Xcode, and it's introducing literally hundreds of warnings into my project, all around documentation. Stuff about doxygen trailing comments and parameters missing documentation. Is there a fix for this? Or perhaps work in progress? It's really annoying. Really easy to see. Just take prebuilt OpenCV, stick it in a project, and import something like opencv.hpp.

Pictures Of The Day.

Since Panda and Penguin, neighborhood Search Engine Optimization has actually come to be an increasing number of of an obstacle for businesses. Blocking the robotics with this Meta Tag means the website will certainly never appear on a search engine result page; it's an SEO killer. Given that advertising and marketing is its main resource of revenue, Google has every reason to help webmasters develop reliable sites for Google seo combined with its marketing program.


This is where local SEO comes into its very own, if these lists are effectively internet search engine maximized to be shown on the first web page of Google for lots of search terms, so that neighborhood business will certainly have a greater direct exposure of its rivals, Therefore, winning more new clients.

Google is currently paying even more caution to Local seek outcomes specifically for Geo-Specific keyword phrases with incorporation of 7-pack in its natural search end results. Managing one receptive internet site is much less of a task seo penalty recovery compared to dedicating to handling 2 internet sites, 2 SEO strategies, and so on. As an example, if I look for equipment store" I am served neighborhood Chicago results due to the fact that my IP address is connected to Chicago.

So if you utilize key phrases in support message, we will get 2 advantages ranking keyword anchor message to the page where it belongs, and position of keyword phrases for the page location. Note this Search Engine Optimization suggestion: Google evaluates the material bordering the inner link as well as utilizes that to establish the content of the linked page. If you're in the paid search area, opportunities are your interests remain in the key phrases that your competitors are ranking for, along with the CPC for those certain key phrases. Neighborhood SEO is slowly getting prominence in this aspect, as business owners recognize its possible in targeting particular audiences. On seeing little to no Search Engine Optimization use, you quickly establish a crazy idea that you could beat them if you in some way amazingly enhance your material. There are typical along with brand-new SERP factors that identify Google maps ranking, especially for regional Search Engine Optimization.Image may be NSFW.
Clik here to view.


Robot of these call for optimizing your web site making use of title tags, description meta tags, keyword phrases and also other elements such as H2, h3, and also h1 tags. So local businesses need to place unique initiative right into maximizing their Search Engine Optimization efforts for local presence, which suggests doing things like optimizing their Google Places web pages. As a local local business owner, you only intend to get consumers that are neighborhood to your company, while other company owner could get clients from around the globe. It should comprehend the requirements of every customer's business and ought to supply custom-made made SEO package deal.

So unless you already have an across the country established online presence on the significant internet search engine, or if you do not have a traditional area, after that neighborhood Search engine optimizations will be an important part of your marketing project.

‘class cv::xfeatures2d::SURF’ has no member named ‘detectAndCompute

I had to deploy my code using surf on a remote server and I had to change the opencv library paths. In particular from `/usr/local` to `/home/spm1428/local`. So now the original compile command was: g++ -DCC_DISABLE_CUDA -I/home/luca/Dropbox/HKUST/CloudCache/cloudcache/CloudCache -I/usr/local/include/opencv -I/usr/local/include/opencv2 -I/usr/include/boost -I/home/luca/vlfeat -O3 -g -Wall -c -fopenmp -std=c++11 -c -o SURFOpenCV.o ../Descriptors/SURFOpenCV.cpp And now is: g++ -DCC_DISABLE_CUDA -I/home/spm1428/CloudCache -I/home/spm1428/local/include/opencv -I/home/spm1428/local/include/opencv2 -I/usr/include/boost -I/home/spm1428/vlfeat -O3 -g -Wall -c -fopenmp -std=c++11 -c -o SURFOpenCV.o ../Descriptors/SURFOpenCV.cpp ../Descriptors/SURFOpenCV.cpp: In member function ‘virtual void cc::SURFOpenCV::ComputeDescriptors(cv::Mat&, cv::Mat1f&)’: ../Descriptors/SURFOpenCV.cpp:34:9: error: ‘class cv::xfeatures2d::SURF’ has no member named ‘detectAndCompute’ surf->detectAndCompute(img, cv::Mat(), pts, descriptors); Of course `SURFOpenCV.cpp` contains `#include "opencv2/xfeatures2d.hpp"`, it compiles correctly on my local version. `/home/spm1428/local/include/opencv2/xfeatures2d.hpp` exists and I don't know why this happens.

SVM not being trained well in c++

I'm using SVM with hog features. When training the SVM I'm not getting the expected format which the SVM generate as below :C_SVCLINEAR1.1.1920928955078125e-07100011212
i
-1 1
1<_> -1.56709105e-02<_>1-1. 1. 0
instead i'm getting big whole numbers as shown : 3C_SVCRBF1.1.9.9999999999999995e-07100016221
i
-1 1
2<_> -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080.<_> -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080.<_>21. 1. -1.
May I know why i'm having this ?

Poker Website Opinions, Information & Bonus Provides

Image may be NSFW.
Clik here to view.
Be aware: If you do not get an electronic mail from us inside a few minutes please be sure to examine your spam folder. Whereas varied mathematical and authorized specialists have used a substantial amount of statistical knowledge to show that poker is a sport based mostly on a substantial diploma of talent and hence be excluded from different forms of playing; most people nonetheless wince at the thought of comparing poker with mental" video games like chess and consider that luck plays a serious function in determining the winner of a poker sport. At we thoroughly test all these options and more to make sure they're the perfect sites. Nonetheless more folks have started making money bets upon prohibited betting and gambling actions in India.

Understanding the Indian online poker legal guidelines, learn how to deposit, and tax laws is usually a bit complicated. As the federal government grows friendlier to on-line poker sites for Indians, anticipate more and more gaming options to turn into out there. You will now be rewarded for bringing your friends to play online poker at Invite your friends and win money chips from us for every good friend whom you deliver alongside. Whereas official gambling for a majority of states in India is confined only to lotteries and horse race betting, poker is quick turning into a well-liked card game among locals. You play poker for free in this tournament , with the free chips and win the free chips.

OBSERVE: believes in responsible gaming for its on-line poker players, which is why we have placed a limit in your most deposit quantity. Jatin Banga based the Online Poker League in partnership with GOPOKER, creating an eight-workforce league that started at nearly the same time as the PSL. The mind sport of poker has just lately started rising at an exponential price in India. It's anticipated that Pokernation and Zee Group will take steps to make sure that poker is fully recognised as a recreation of ability by governments and the judiciary and doubts about playing poker for stakes are eliminated. Rs three.36 crore prize cash would be distributed among the many winners of this league.

Earlier even access to many websites where all sorts of card video games and poker games had been banned and solely allowed in few said however this is not the state of affairs now. Gray markets refer to international locations the place unregulated on-line playing is nominally unlawful, however governments have not handed legal guidelines specifically forbidding it, whereas black markets, of course, have handed such laws. We'll really get together!" Alas, this particular Indian on line casino turns out to be less amenable to a author poking around than the Metropolis of Desires folks in Macau, the place every part is evident and above board.


However, three days later, the IPC group launched a new firm—Spartan On-line Pvt. Probably the most gripping a part of the league is that all the events will likely be streamed dwell on Digital Media - bringing each pleasure and recognition to the game. Equally, any other nation may declare that for the reason that website Poker is accessible from its jurisdictions and its residents are taking part in at Poker website it has the jurisdiction. There isn't a denying the truth that the popularity of poker is rapidly rising in India. PokerBaazi a venture of Baazi Networks Private Restricted is an internet portal aimed toward providing a user pleasant environment of ability gaming. We offer our free service that recommends one of indian poker site khelo365.com the best of the most effective Indian online poker sites.

On this vein, India's favorite online poker site, Khelo365 is officially India's first authorized online poker web site. The federal government has used this energy to instruct Web Service Providers to forestall Indian residents from accessing sure overseas betting and gaming websites, but we don't know for positive how effective this has been or which websites have been blocked. Whereas lottery is on the market online to many Indians, there is no signal of actual progress in on-line gambling website licensing both by India's central government or by any of the states. KhelPlay Poker brings you the opportunity to play poker online in India for cash.

They don't seem to be at all complying with the cyber regulation due diligence (PDF) requirements of Indian cyber legislation. The entire best poker sites out there to Indian gamers are safe and secure for actual money poker online online poker. And a few chips have small edges which are seen solely on shut inspection so no massive deal. Players attempt to guess if they have the highest card based on the distribution of seen playing cards and how other gamers are betting. KhelPlay is poker your ultimate trip spot to have the benefit of on-line poker as well as to win money. Gambling laws in India is certainly and closely restricted aside from selective categories together with lotteries and horse racing. Many poker periods stretch over 10-12 hours with gamers typically needing cocaine or other medicine to assist stay alert. Has world-class poker software program to make your poker playing expertise a unbelievable one.

You may attempt your hand at Texas Maintain'em Poker, Pot Limit Omaha Poker, Single Table Tournament Poker, Free Poker, Free roll Poker Tournaments, Sit N Go Poker, Ring Poker, Multi Table Poker Tournaments, and far more! Asrani is one of the most popular Indian poker players and has bagged a number of Indian and worldwide poker titles in online as well as offline poker. The very best websites for which we provide scores are additionally vetted for software capabilities, customer service, high site visitors for bigger event fields, a wide range of betting limits and sport variations, and the perfect on-line poker bonuses and player loyalty applications. Here is more info about indian poker site khelo365.com review our own internet site. On this sport of life, the hand dealt represents determinism, the way in which you play it's free will ! The first on-line gaming license (paywall) awarded in India was issued by the state of Sikkim, for on-line lottery, again poker in November 2014. Even in cash games at home, I get the feeling that many players really feel like rock stars.

The Indian poker scene is still very young, but each year the sport poker online becomes increasingly fashionable as players around the country are uncovered to it. For a few years it was troublesome for gamers to enjoy the sport, since Indian casinos were not allowed to supply desk video games. Nonetheless maintaining with the choice of Indian gamers, you'll be able to take pleasure in Rummy, in addition to different main video games akin to Texas Hold'em and Omaha. After successful completion of learning the basics of poker, gamers are supplied with a number of poker methods and techniques to get an edge whereas taking part in poker on-line , in addition to it seems to be very helpful whereas making important selections. Earning the tag of being the primary Legal Poker Online isn't any imply feat in such a conservative country like ours that has a murky view towards card video games. Again, the dialogue is more targeted on some entertaining phrase play moderately than poker actuality.Image may be NSFW.
Clik here to view.
online poker india,poker online india,poker india,india poker


Owned by The Deltin Group, Deltin JAQK is likely one of the premium entertainment casinos, offering 'International Normal' 'High High quality' Dwell Gaming expertise to the players. This manner many beginners who want to participate in tournaments and poker leagues can fulfil their dream to play in a championship and see what is in store for them. Speaking concerning the potential of the league, Mr. Amit Burman, Founder, Poker Sports activities League said, Poker is a well-liked mind sport throughout the globe and has gained great traction within India, amongst people looking to problem their thoughts, grit and choice making talents. It is also necessary that the net poker software program is easy and responsive even when enjoying the maximum variety of tables. Place refers to the place you might be seated on the poker table and decides when your turn will come. Depositing funds into players account has develop into much easier with the help of PayU.

SVM not being trained well in c++

I'm using SVM with hog features. When training the SVM I'm not getting the expected format which the SVM generate as below :C_SVCLINEAR1.1.1920928955078125e-07100011212
i
-1 1
1<_> -1.56709105e-02<_>1-1. 1. 0
instead i'm getting big whole numbers as shown : 3C_SVCRBF1.1.9.9999999999999995e-07100016221
i
-1 1
2<_> -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080.<_> -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080. -431602080.<_>21. 1. -1.
May I know why i'm having this ?

Converting image into an array of 2D coordinate points and colors

So, Hello everyone. I am working on a project and need a little help. I have a base code for a machine that can move a pneumatic piston to a coordinate on a 2d plane. It also has functions to be able to select a color (based off a var) and select that color by moving the piston up and down over a pallet and then goes to the coordinates provided in the variable. The machine is coded in C and basically it needs to convert lets say a .jpeg image into this format when it converts i want it to be basically a notepad document with this inside: blue[32,3],red[25,56],yellow[4,7],blue[7,9],red[2,3],yellow[25,56] And so then the machine would run at x32 and z3 to put down the color blue, clean the brush and then continue on to the next. Also it can create the different colors like purple and such on the side then once it knows it is created the purple, orange, and green functions can be used in the program. That i can code in. If anyone can help that would be great thank you! :)

program will stuck when using detectMultiScale

I trained a cascade classifier to detect cars. I have 415 positive samples and 544 negative samples. After I trained the classifier, I got cascade.xml. When I use it in my program, the program will stuck when execute detectMultiScale function. But if I used trained classifier by others, there is no problem. I compare the xml file, there are some difference. I don't know whether the problem is caused by the version of xml file. Dose any one have some idea?

I want to connect sj50000x wifi cam with python opencv in my laptop

cam name : sj5000x wifi cam lap: dell inspiron 3537 os : win10 using 64bit python software with opencv

Floating point exception when looping and reading images

I'm building a line following robot with OpenCV (c++), Raspberry Pi, Arduino, and an Arducam. I keep getting a Floating point exception when I decrease the delay time between image scans (at the end of the loop in main(), down to a 1 second delay). A bash script simultaneously captures an image from the Arducam, and the c++ program continuously reads the same image file name that's being written over. At first I thought the exception was thrown because the image file was not finished being written to before it was read, but I wrote the loadImage() method in a way where (I hope) the method would not return until the data is complete. It could be wrong, I am just looking for a way to avoid or ignore the Floating point exception. #include #include #include #include #include #include #include #include #include #include #include #include #include #define ADDRESS 0x04 // The Arduino I2C address static const char *devName = "/dev/i2c-1"; // The I2C bus using namespace cv; using namespace std; // Line Detection program // Efficient method to reduce noise Mat& scanAndReduce(Mat& I, const int* const table) { // accept only char type matrices CV_Assert(I.depth() == CV_8U); int channels = I.channels(); int nRows = I.rows; int nCols = I.cols * channels; if (I.isContinuous()) { nCols *= nRows; nRows = 1; } int i,j; uchar* p; for( i = 0; i < nRows; ++i) { p = I.ptr(i); for ( j = 0; j < nCols; ++j) { p[j] = table[p[j]]; } } return I; } // Loads command-line argument image file location int loadImage(Mat& source, char argv[]) { while ( !source.data ) { source = imread(argv, 0); } return 0; } // Displays input image in new window void display(Mat& image) { namedWindow("Result", WINDOW_NORMAL); imshow("Result", image); waitKey(0); } // prints 10x10 ellipse with input center and height to input matrix void drawEllipse(Mat& destination, int center, int lineY) { ellipse( destination, // destination matrix Point(center,lineY), // location Size(20,20), // size 0, // angle 0, // start 360, // end Scalar(100,0,0)); // color } // Scan bottom half of screen to see where line is int scanLines(Mat& sourceImage) { int diff = (sourceImage.rows) * 0.1; // distance between scan lines int lineY = (sourceImage.rows) * 0.9; // starting scan line int vals[sourceImage.cols]; // save line values (left to right) int center = 0; // sums indexes of dark values int numDark = 0; // tracks dark values int offset = 0; // get values along scan lines for(int i = 0; i < 5; i++) // traverse y axis (bottom to top) { center = 0; // sums indexes of dark values numDark = 0; // tracks dark values Scalar intensity; int leftBound = sourceImage.cols * 0.25; int rightBound = sourceImage.cols * 0.75; for(int j = leftBound; j < rightBound; j++) // traverse x axis of image { intensity = sourceImage.at(Point(j,lineY)); // save value vals[j] = intensity[0]; // get first value (greyscale) // save dark value if(vals[j] < 100) { center += j; // add index to sum numDark++; // increment dark counter } } // calculate center of dark values center = center/numDark; offset += center; // draw center drawEllipse(sourceImage, center, lineY); lineY -= diff; } offset /= 5; return offset; } void sendToArduino(int val) { // connect to Arduino cout<<"I2C: Connecting"<= divideWith) table[i] = 255; if(table[i] < divideWith) table[i] = 0; } cout<<"Starting loop..."< center turn right if (offset > center) { offset = 2; } else if (offset < center) // turn left { offset = 3; } else // go striaght { offset = 4; } sendToArduino(offset); imwrite("out.jpg",sourceImage); } sleep(1); } return 0; } Sorry for the long code, thanks for any help! First time using opencv.
Viewing all 41027 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>