Ask Your Question

# Esh's profile - activity

 2020-09-15 11:22:37 -0500 received badge ● Student (source) 2020-06-30 14:56:38 -0500 received badge ● Notable Question (source) 2020-02-22 16:05:16 -0500 received badge ● Popular Question (source) 2018-12-25 04:49:12 -0500 marked best answer Mean of the distance transform I need to use openCV python to find the average width of the curve as attached in the image. I used distance transform to find the maximum width : dist = cv2.distanceTransform(img, cv2.DIST_L2, 3) mnv, mv, _, mp = cv2.minMaxLoc(dist) print(mv * 2, mp) # (half)width*2, pos  For the average width, i tried: avgwid=2*np.mean(dist)  as well as: avgwid= 0.5*(mnv+mv)  However, both options are giving me the incorrect results. What is the correct way to find average width of the curve ? A solution in python would be highly appreciated. Thanks. 2018-12-19 04:12:27 -0500 commented answer Mean of the distance transform any example python implementation of using the skeleton and distance transform to find width at every points would solve 2018-12-19 04:12:10 -0500 commented answer Mean of the distance transform any example implementation of using the skeleton and distance transform to find width at every points would solve all my 2018-12-19 04:10:47 -0500 commented answer Mean of the distance transform Hi I have already written the program to find the coordinates of the skeleton. I just do not know how to proceed from t 2018-12-19 03:25:40 -0500 asked a question Mean of the distance transform Mean of the distance transform I need to use openCV python to find the average width of the curve as attached in the ima 2018-12-19 03:20:48 -0500 marked best answer Using openCV python to detect concrete cracks Could anyone have an idea how i can isolate just the cracks from the image of a concrete surface. My input image is something like this: I am expecting my output to be something like this: I have tried canny edge detector but that gives me a broken contour. I tried dilation followed by erosion but that increases the width of crack segment in the binary image and that will be a problem as the width should not be changed. I need a closed contour of the crack without change in width. Can anyone point me in the right direction ? 2018-12-17 20:09:43 -0500 commented answer Finding distance between skeleton and boundary can i please have a look at the sample code ? I am a beginner in programming. I am having a tough time trying to underst 2018-12-17 19:41:01 -0500 commented answer Using openCV python to detect concrete cracks I do not get the same crack width if i do this. My crack width is highly exaggerated after i apply the sobel operator. I 2018-12-17 19:40:39 -0500 commented answer Using openCV python to detect concrete cracks I do not get the same crack width if i do this. My crack width is highly exaggerated after i apply the sobel operator. I 2018-12-16 21:18:11 -0500 asked a question Using openCV python to detect concrete cracks Using openCV python to detect concrete cracks Could anyone have an idea how i can isolate just the cracks from the image 2018-12-16 21:08:33 -0500 asked a question Finding distance between skeleton and boundary Finding distance between skeleton and boundary I am trying to find maximum width of a curve using openCV in python. I us 2018-12-15 23:46:25 -0500 edited question Does openCV distance transform work for horizontal distance but not for vertical distance ? Does openCV distance transform work for horizontal distance but not for vertical distance ? I am using openCV distance t 2018-12-15 23:46:21 -0500 edited question Does openCV distance transform work for horizontal distance but not for vertical distance ? Does openCV distance transform works for horizontal distance but not for vertical distance ? I am using openCV distance 2018-12-15 23:44:51 -0500 asked a question Does openCV distance transform work for horizontal distance but not for vertical distance ? Does openCV distance transform works for horizontal distance but not for vertical distance ? I am using openCV distance 2018-12-09 00:27:54 -0500 commented answer Segmenting two contours into two different images of same size using openCV-python Works. Thanks. I found that this works too when you have multiple contours: _, cnt, hierarchy = cv2.findContours(img.co 2018-12-09 00:27:39 -0500 commented answer Segmenting two contours into two different images of same size using openCV-python Works. Thanks. I found that this works too when you have multiple contours: _, cnt, hierarchy = cv2.findContours(img.co 2018-12-09 00:25:49 -0500 marked best answer Segmenting two contours into two different images of same size using openCV-python I have two contours in the first image: . I need to segment out individual contours and make two images out of it like this: and . The individual output image has to be of the same dimension as the input image. How can this be achieved using openCV-python ? My code for drawing contours: image, contours, hier = cv2.findContours(im, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) for c in contours: rect = cv2.minAreaRect(c) box = cv2.boxPoints(rect) # convert all coordinates floating point values to int box = np.int0(box) # draw a red 'nghien' rectangle cv2.drawContours(im, [box], 0, (0, 0, 255)) cv2.drawContours(im, contours, -1, (255, 255, 0), 1)  2018-12-08 01:26:47 -0500 edited question Segmenting two contours into two different images of same size using openCV-python Segmenting two contours into two different images of same size using openCV-python I have two contours in the first imag 2018-12-08 01:24:25 -0500 edited question Segmenting two contours into two different images of same size using openCV-python Segmenting two contours into two different images of same size using openCV-python I have two contours in the first imag 2018-12-08 01:23:56 -0500 received badge ● Editor (source) 2018-12-08 01:23:56 -0500 edited question Segmenting two contours into two different images of same size using openCV-python Segmenting two contours into two different images of same size using openCV-python I have two contours in the first imag 2018-12-08 01:23:27 -0500 asked a question Segmenting two contours into two different images of same size using openCV-python Segmenting two contours into two different images of same size using openCV-python I have two contours in the first imag 2018-12-08 01:17:25 -0500 received badge ● Enthusiast 2018-11-30 21:48:15 -0500 commented answer Using openCV distance transform to find width of a curve @berak Thank You. Exactly what i was looking for :) 2018-11-30 21:47:47 -0500 received badge ● Supporter (source) 2018-11-30 21:47:46 -0500 marked best answer Using openCV distance transform to find width of a curve I am trying to find width of a curve/line segment using openCV in python. The image on the left is the input image. I just need the maximum width. I read that Distance transform can help give the width. I used distance transform and was able to get the image on the right as a result. Now, I am stuck on how do i get the width of the curve from this result image of distance transform. My code for distance transform: dist=cv2.distanceTransform(image,cv2.DIST_L2,3) cv2.normalize(dist,dist,0,1.0,cv2.NORM_MINMAX) A solution in python would be highly appreciated. Thanks in advance. 2018-11-30 21:47:46 -0500 received badge ● Scholar (source) 2018-11-30 01:14:01 -0500 asked a question Using openCV distance transform to find width of a curve Using openCV distance transform to find width of a curve I am trying to find width of a curve/line segment using openCV 2018-11-17 22:39:01 -0500 commented answer Finding distance between two curves @agroms Any update on doing this on python ? 2018-11-16 22:04:19 -0500 asked a question distance between canny edges distance between canny edges I was following this thread. I need the equivalent code in python desperately. Could you he