c++ - OpenCV histogram of an irregular shape -
i'm comparatively new opencv. wondering if possible histogram of contour (which can perfect rectangular or irregular in shape) found findcontour.
thanks in advance.
edit:
this i'm trying achieve. want analyse area in contour detect defects (by analyzing histogram of area ?) , declare piece defective or good. images attached.
good sample. (contour detected outlined in gray color)
defective sample. (defect around top left corner)
you may misuse histogram.
contour
of image should binary-valued, color-less matrix which not represent grayscale-level of pixels, boundaries. meanwhile, histogram
tool analyzing how grayscale-valued of pixels distribute in 2d image, isn't it?
thus, why want profile histogram
of binary-valued matrix might not analyzing image? histogram not right t ool contour analysis though.
what may histogram should two-bar histogram because contoured matrix contains binary values. might not helpful analysis.
Comments
Post a Comment