Capture image of cylinder from Video
Breaking down the .avi video into pictures (a bunch of pictures from frame 1 till last frame). From the of picture, set the 3 lines in the image to capture the pixel (set to 1 pixel width). As shown in the picture below. 3 lines with an equal spacing (40mm from my 3D cad software, I am not sure in pixel distance). Must read the 1st image till the last image. Each line have to cover 120° of area of cylinder. So, after line 1 capture the 1st 120° of cylinder 1, line 2 will capture the 2nd of 120° of cylinder 1 and so to line 3 will capture the 3rd of 120° of cylinder 1. During line 2 capture the 2nd of 120° of cylinder 1. Line 1 will start to capture the 1st of 120° of cylinder 2 and so the rest. The line of pixels captured in step 3 will need to be stitched into a picture. It seems like we flatten the surface of the round cylinder. Lastly, named the image as Cylinder 1, Cylinder 2,….and so on. (this is the result I need) At the end, we can delete all the images which we capture at step 1.
please show, what you've tried so far.
Please Find My Attachment on My question Thank You C:\fakepath\Opencv.jpg
Please Help In my question Thank You.
we can help you improve what you already have, but we won't* write your program*, so again, -- we need to see your current attempt at it.
cap = cv2.VideoCapture("C:\Users\ABC\Downloads\choo\SIMPLIFIED CONVEYOR_C40mm_R80mm.avi")
x1 = 938 y1 = 140 w1 = 150 h1 = 315
x2 = 1076 y2 = 140 w2 = 150 h2 = 315
x3 = 800 y3 = 140 w3 = 150 h3 = 315
contours1 = [] contours2 = [] idx = 0 while(1): ret, frame = cap.read()
have you any idea regard my question?