Ask Your Question

Frostyfox's profile - activity

2018-09-24 06:11:39 -0600 marked best answer Detect long wavy line in image text

Hi,

Is it possible to detect the longest wavy line in following images and remove it. The line can be in any place of the image

I tried to apply erosion to remove those lines but for different types of font it is not working. Is it possible to to detect all long line in picture and erode that alone ?

Tried this code to predict lines but cant able to do it

inputImage = cv2.imread("input.png")
inputImageGray = cv2.cvtColor(inputImage, cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(inputImageGray,150,200,apertureSize = 3)
minLineLength = 30
maxLineGap = 5
lines = cv2.HoughLinesP(edges,cv2.HOUGH_PROBABILISTIC, np.pi/180, 30, minLineLength,maxLineGap)
for x in range(0, len(lines)):
    for x1,y1,x2,y2 in lines[x]:
        #cv2.line(inputImage,(x1,y1),(x2,y2),(0,128,0),2, cv2.LINE_AA)
        pts = np.array([[x1, y1 ], [x2 , y2]], np.int32)
        cv2.polylines(inputImage, [pts], True, (0,255,0))

font = cv2.FONT_HERSHEY_SIMPLEX
cv2.putText(inputImage,"Tracks Detected", (500, 250), font, 0.5, 255)
cv2.imshow("Trolley_Problem_Result", inputImage)
cv2.imshow('edge', edges)

image description

image description

image description

image description

image description

2018-09-24 06:11:39 -0600 received badge  Scholar (source)
2018-09-23 02:01:59 -0600 commented answer Detect long wavy line in image text

Hi, Thanks for the help. This is working fine for sin type of distortion how ever Images are coming with both sin and c

2018-09-21 12:05:08 -0600 asked a question Detect long wavy line in image text

Detect long wavy line in image text Hi, Is it possible to detect the longest wavy line in following images and remove i