opencv - How can I separate color pixels that are not common for two images? -
here's do:
i have image of rice leaf. have image of rice leaf got brown color spots on leaf. want separate color pixels not common 2 images using opencv.(color of spots can vary)
i tried using histogram intersection. managed find number of pixels common between 2 images.
is there way using opencv? please me kind enough me.
if 2 images match perfectly
- if match use
rhinodevel
approach: - so loop through pixels of first image
- and compare each pixel corresponding pixel second image
- if difference higher treshold
- you found not matching pixel , need do
- like add pixel output map or recolor (brown) pixel color first image or whatever
if 2 images not match
- so got reference leaf image , processed image can have position/rotation skew
- create list of colors per each image
- sort them ascending color
- cross compare booth lists
- if color in list2 not in list1
- then recolor/copy pixels contains such color in/from image2
- this approach slower
o(xs*ys*n)
xs,ys
image 2 resolution ,n
number of non common colors
[notes]
- rgb fine may got better result on hsv color space
- in hsv can compare 3 parameters or few of them ignoring
v value...
Comments
Post a Comment