So i have an image that has been processed with the sobel method, and now i need to extract that image.
My problem is how can i start scanning the image from the mid line uo and down line by line, and when the number of edge is less than 60, record that coordinate to crop the image.
The image in question is a barcode, and this method should work for extracting only the bars. The problem is the implementation with emgu cv.
Update:
I am following the method described in this paper: http://bit.ly/HUWdcy
This question is referent to the C. Image Extraction Chapter
Check the
cv::thresholdandcv::reducefunctions.First wil create a binary map out of your edge image, with black on the stripes, and white on background.
Like this small example:
After edges
After threshold
Second function can be used to “project” the image on one of its dimensions, using
CV_MAX, orCV_SUM, orCV_AVG, and you will have the barcodes stored in a rowExample for
reducewithSUM:Now, reapply a threshold: