2019-11-23 11:20:24 -0600 | received badge | ● Famous Question (source) |
2018-07-26 02:36:52 -0600 | received badge | ● Notable Question (source) |
2017-11-08 21:23:23 -0600 | received badge | ● Popular Question (source) |
2017-08-09 07:21:09 -0600 | received badge | ● Student (source) |
2016-08-06 09:36:15 -0600 | received badge | ● Editor (source) |
2016-08-05 05:35:16 -0600 | commented answer | How to sort contours left to right, while going top to bottom Could you please provide a code snippet for what you've just described? Also will that work for sorting alphabet contours as well? They have different y values for taller and smaller characters. |
2016-08-05 04:58:34 -0600 | asked a question | How do I merge the bounding rectangles generated for i,j and '?'? I want to create an OCR software using python and openCV. I managed to find the contours and generated the bounding rectangles. However the code seems to detect two separate bounding rectangles for 'i', 'j' and '?'. One for the dot and one for the rest of the body. I want to merge those two bounding rectangles. How do I go about doing that? Here is an example for i. http://i.imgur.com/mtu7SSr.png Here's the code snippet I used to find the contours and add the rectangles. I understand that I need to properly sort these rectangles first from left to right and top to bottom and then do the merge. But I cannot seem to be able to figure out a way to do either. Any help would be greatly appreciated. |
2016-08-05 04:46:30 -0600 | received badge | ● Supporter (source) |
2016-07-29 09:21:35 -0600 | asked a question | How to sort contours left to right, while going top to bottom I'm finding the contours for an image with digits and characters, for OCR. So, I need the contours to be sorted left to right, while going line to line, i.e. top to bottom. Right now, the contours aren't sorted that way. For example, the contours for the above image is sorted randomly. What I need is the sorting as D,o,y,o,u,k,n,o,w,s,o,m,e,o,n,e,r,.(dot),i(without dot),c,h...and so on. I've tried couple of methods where we first observe the y-coordinate and then use some keys and the x-coordinate. Like right now, I have the following sorting code. It works for the first 2 lines. Then in the 3rd line, the sorting somehow doesn't happen. The main problem seem to be in the letters such as i, j, ?, (dot), (comma), etc where the y axis of the (dot) varies, despite belonging to the same line. So what might be a good solution for this? |