From 6420c83de4cd880f5c2881b8f3793746089a1c05 Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Tue, 17 Jan 2017 17:06:09 +0000 Subject: stuff and thangs --- doc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc b/doc index e61cd8c..a82be05 100644 --- a/doc +++ b/doc @@ -45,3 +45,12 @@ blue or red after testing with some other images, i have decided to move circle closeness requirement higher to 35, as i got one very clear picture of th capball that scored a 32%. the diffrence in regularity is not good enough for distinguishing capball from particle.i some more testing with the blue ball and one of them was a false negative. 3 more false positives, also one of the particles was below the cut off area. another false negative red ball at 36%, ut it was really covered up by a lot if stuff. +1/17/2017 + I am finding a new way to detect holes in the ball by masking the image with the cotour to + be differentiated, and then find the area of the countours there, in V values, as a percentage of + the area of the main contour. + I just found out that ret is te threshhold value found, OTSU automatically finds a threshold value between two peaks in the histogram. I want to use this for the first threshold but the re values for hue are not contigous, I will use i just for the red component of BGR. adaptive threshholding takes into consideration lighting conditions, this will be used in the second level maskin +g.More info here:http://docs.opencv.org/trunk/d7/d4d/tutorial_py_thresholding.html + to make a mask from a contour, we simply make an empty image and draw the contours. we then threshhold the v value with adaptive thresholding, my fears about the 0s outside of the mask are unfounded.actually, it passess the entire black region as white. So i will do percentage of average instead. +function used: conmasked = cv2.adaptiveThreshold(conmasked, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 3) +I tried the mean of v in the contour, it only works on close ups, for now i guess we'll use size based ones. -- cgit v1.1