2017-06-19 09:33:10 -0600 | commented answer | img = img1*mask + img2*(1-mask) How do that ? Can thread creation be a problem? Are you making 4 new threads for each image? https://stackoverflow.com/questions/3929774/how-much-overhead-is-there-when-creating-a-thread |
2017-06-19 08:57:03 -0600 | commented answer | img = img1*mask + img2*(1-mask) How do that ? How are you measuring time? Have you considered granularity of time measurement? When completion time is small, It is right to use loops for precision: |
2017-06-19 05:59:56 -0600 | commented question | img = img1*mask + img2*(1-mask) How do that ? Why your code is slow? There are 2 reasons: 1)You are using .at, which is slower than pointer access. 2)You are using Vec3b for pixel access. Every time you are writing .at<vec3b>, new object of class Vec3b is being created. |
2017-06-19 05:51:05 -0600 | commented question | img = img1*mask + img2*(1-mask) How do that ? You can modify your loop body to make it faster: To make It even faster you can make conversion table from uchar to double for c1. Just preprocess values from 0/255.0 to 255.0/255.0. And you can preprocess 1 - c1 too. |
2017-06-19 05:48:54 -0600 | commented question | How to load old format cascade on OpenCV 2.4.10? I used my custom cascade, which has been trained about 2 years ago. I don't even remember where the training data is. By the way, I successfully launched ocl cascade with old-format cascades from opencv distribution. And I found in cv version 3 sources cascades converter from old to new: https://github.com/opencv/opencv/blob/master/modules/objdetect/src/cascadedetect_convert.cpp So the questions is: is converter from new to old format needed? |
2017-06-16 08:11:45 -0600 | asked a question | How to load old format cascade on OpenCV 2.4.10? I am currently trying to use cv::ocl::OclCascadeClassifier, but It uses oldCascade only which is NULL (so I got invalid cascade cv exception). Method isOldFormatCascade() returns false, method load() returns true. If I use cv::CascadeClassifier, all works fine (because there are 2 branches in its implementation: for old format and for new format cascades). |