iphone Programming Glossary: contours
adjust corners and crop the image openCV http://stackoverflow.com/questions/13098073/adjust-corners-and-crop-the-image-opencv cv Mat image Mat img0 image Mat img1 cvtColor img0 img1 CV_RGB2GRAY apply your filter Canny img1 img1 100 200 find the contours vector vector cv Point contours findContours img1 contours CV_RETR_EXTERNAL CV_CHAIN_APPROX_NONE you could also reuse img1.. img1 cvtColor img0 img1 CV_RGB2GRAY apply your filter Canny img1 img1 100 200 find the contours vector vector cv Point contours findContours img1 contours CV_RETR_EXTERNAL CV_CHAIN_APPROX_NONE you could also reuse img1 here Mat mask Mat zeros img1.rows.. apply your filter Canny img1 img1 100 200 find the contours vector vector cv Point contours findContours img1 contours CV_RETR_EXTERNAL CV_CHAIN_APPROX_NONE you could also reuse img1 here Mat mask Mat zeros img1.rows img1.cols CV_8UC1 CV_FILLED..
Boundry detect paper sheet opencv http://stackoverflow.com/questions/13493035/boundry-detect-paper-sheet-opencv edge detection Mat blurred image medianBlur image blurred 9 Mat gray0 image.size CV_8U gray vector vector cv Point contours find squares in every color plane of the image for int c 0 c 3 c int ch c 0 mixChannels image 1 gray0 1 ch 1 try several.. holes between edge segments dilate gray gray Mat cv Point 1 1 else gray gray0 l 1 255 threshold_level Find contours and store them in a list findContours gray contours CV_RETR_LIST CV_CHAIN_APPROX_SIMPLE Test contours vector cv Point approx.. Mat cv Point 1 1 else gray gray0 l 1 255 threshold_level Find contours and store them in a list findContours gray contours CV_RETR_LIST CV_CHAIN_APPROX_SIMPLE Test contours vector cv Point approx for size_t i 0 i contours.size i approximate contour..
color replacement in image for iphone application http://stackoverflow.com/questions/15082025/color-replacement-in-image-for-iphone-application below javacv code and same ported to opencv too. this solution has 2 problems don't have edge detection i think using contours i can achieve it replaced color has flat hue and sat which should set based on source pixel hue sat difference but not sure..
|