java - OpenCV light reflection reduction -



java - OpenCV light reflection reduction -

i have problem lite reflection, here's image taken standart camera

and process do

1. blur image imgproc.gaussianblur(blurred, blurred, new size(17, 17), imgproc.border_isolated); 2. create sec empty image using hsv imgproc.cvtcolor(gray0, gray0, imgproc.color_bgr2hsv); 3. mix image color chanel (fromto {0,0}) core.mixchannels(blurredlist, graylist, fromto); 4. threshold, canny, , delate imgproc.threshold(gray0, gray0, 126, 255, imgproc.thresh_trunc); imgproc.canny(gray0, gray0, 50, 70); imgproc.dilate(gray0, gray0, mat.ones(new size(3, 3), 0)); 5. finding contour imgproc.findcontours(gray0, contours, new mat(), imgproc.retr_external, imgproc.chain_approx_simple); 6. magicall filter biggest contour , stuff

and here result how can remove backlight or connected broken line detected contour?

the problem here reflection oversaturates pixels. there 2 possible paths take here;

adjust condition

adjusting status easiest path. controling conditions image taken, can remove (if not all) hard situations (such these). think using polarized filters, improve (eg; diffuse) lighting, improve exposure settings, etc.

adjust image

the other alternative (eg; removing highlights afterwards) much more difficult. because oversaturation destroys lot of data. mutual used method utilize hdr images, tend preserve lot more data, images taken @ varying exposures. in cases problem might occur due raw conversion; improving quite tedious.

java android opencv

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -