Lab = cv2.cvtColor(img, cv2.COLOR_BGR2LAB) # returns the stored number (stored in self.flags) Then I used opencv's findContours to mark out the perimeters:Īfter that I cropped out each individual number:Īnd then I looked for each segment individually and determined the number based on which segments were active (I used a special case for 1 where I checked the ratio of the width and height). In this case I first converted to LAB and thresholded on the b-channel. You've marked out the corners so I'll assume that you can reliably crop out and un-rotate (make it flat) the display. Especially given that this is a 7-segment display we should be able to solve this without resorting to that kind of complexity. I feel like using a CNN is overkill for a problem like this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |