Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

and do the tail by read in OpenCV docs or the next answer ;)

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

and do the tail by read in OpenCV docs or the next answer ;)

;) (But as far as I understoodd he has to extract the object ROI after identifying the obkect)

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

and do the tail by read in OpenCV docs or the next answer ;) (But as far as I understoodd he has to extract the object ROI after identifying the obkect)

object)

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

and do the tail by read in OpenCV docs or the next previous answer ;) (But as far as I understoodd he has to extract the object ROI after identifying the object)

Professional industrial computer vision libraries, such as Cognex or Halcon, are usually made to give a relative inexperienced user the possibility to write image processing code in a realy easy way (My point of view). So they provide some functions that combine a cluster of basic functions where as much as possible parameters are adjusted itself.

That has the advantage, that you don't have to care about a lot of problems, but the disadvantage is, that in many cases you don't know what the function really does. (I know that because I'm actually porting a Halcon written library into a OpenCV one).

Short description: You will have to do (often a lot) more handwork, but you can get faster and more accuracy code if you know what you do (not because the professional libraries are bad/slow/..., but because you can write more adapted code and debug into OpenCV code).

To your special problem: This sounds like (in a naive view):

binarize image with: cv::threshold, cv::Canny, ...

find contours (make problem to a 1D one): cv::findContours

choosing wanted contour using whatever

and do the tail by read in OpenCV docs or the previous answer ;) (But as far as I understoodd understood he has to extract the object ROI after identifying the object)