Closed galli-leo closed 9 years ago
Sorry it is my fault. Strangely when applying filters with CIFilters all images rotate by 90°
What do you mean "now the sentence is repeated"? Are you still running the same code that you mention above? What image are you trying to recognize on? What filters?
In general, please always include a really detailed description of what you're doing to cause the issue you're reporting, because otherwise we can't reproduce the issue ourselves to help you.
Actually, since this (the result being repeated) seems to be the same issue you describe in #149, I'm going to close this issue and mark it as a duplicate. Please continue this discussion in #149.
Sorry I posted the sentence is repeated to the wrong issue. The issue here still persists: This is the tesseract variable after recognizing or after setting the rect
actually although it does not say the rect is there it still works.
One thing you should know is that any time you set the image, we reset the rect
member variable of G8Tesseract
to be a rectangle with origin (0,0) and width and height to match the new image. However, we still actually call the upstream Tesseract setRectangle
function even if you set the rectangle BEFORE setting the image, so that explains why it still works. But you might want to still set the rectangle AFTER you've set the image, because that will make sure that the rect
member variable of G8Tesseract
reflects the correct rectangle that Tesseract will be looking at.
Now, on to the issue of the debugger not showing the rectangle that you've set. I was able to reproduce this in Swift, and honestly I can't explain why the debugger does not show the rectangle that was set. I even tried what I mention in the previous paragraph (setting the rect after setting the image), and it's still all zeroes.
However, when I look at setting the rectangle in the Template Framework Project (which is an Objective-C demo app included in this repo), I see the rectangle being set correctly:
So long story short, don't worry that you're not seeing the rectangle being set in Swift because I think this is a bug in Apple's Swift debugger since it does show up correctly in Objective-C.
I wanted to set a rect on the tesseract as follows:
But it does not work. When using the debugger it says the rect is 0,0,0,0 and the result is either a one or two letter combination which does not in anyway correspond to the image.