c++ - how to apply optical flow vector to detected circle only -


i working on traffic sign detection project. circular traffic sign has been detected, want calculate optical flow vector traffic sign not whole image. find radius of detected circle not sure how use create circular mask iplimage provide "cvgoodfeaturetotrack" , "cvcalcopticalflowpyrlk()"

any suggestion please ?

say have center , radius of traffic sign, i.e.:

cv::point center(200, 300); int radius = 50; 

the region of interest, goodfeaturestotrack work can controled cv_8uc1 mask has same size input image:

cv::mat mask = cv::mat::zeros(grayframe.size(), cv_8uc1); cv::circle(mask, center, radius, cv::scalar::all(255), -1); 

finally call function our new mask filled 255s according traffic sign:

cv::goodfeaturestotrack(grayframe, corners, 100, 0.01, 10, mask); 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -