opencv - openv HSV is soo noisy -
good day
i try filter video subtracting colors in specified range. while recorded image still or not changed hsv filtered image looks shaken , not stable. shake or instability cause lot's of problem in processing. there way can filter image in stable way
this sample code of filter ... part of code
while (1) { //first frame read cap.read(origonal1); morphops(origonal1); cvtcolor(origonal1, hsv1, color_bgr2hsv); inrange(hsv1, scalar(0, 129,173), scalar(26,212, 255), thresholdimage1); waitkey(36); //second image read , convert hsv cap.read(origonal2); morphops(origonal2); cvtcolor(origonal2, hsv2, color_bgr2hsv); inrange(hsv2, scalar(28, 89, 87), scalar(93, 255, 255),thresholdimage2); morphops(thresholdimage1); morphops(thresholdimage2); //create mask detect motion of color range , don't //care other colors motion detection maskimage = thresholdimage1 | thresholdimage2; //make difference between images absdiff(thresholdimage1,thresholdimage2,imagedifference); imagedifference = imagedifference&maskimage; morphops(imagedifference); imshow("threshold image", imagedifference); //search movement update origonal image searchformovement(thresholdimage1, origonal1); imshow("origonal", origonal1); imshow("hsv", hsv1); imshow("threshold1", thresholdimage1); imshow("threshold2", thresholdimage2); //wait while give break processor //waitkey(1000); }
in advance.
try function
fastnlmeansdenoisingcolored( frame, frame_result, 3, 3, 7, 21 );
it's slow trying.
Comments
Post a Comment