Ocr in Match doesn't match with Match position after position editing

Asked by matteoa on 2020-06-23

Hello, below there is my snippet extracted from a bigger script:
I look for an image that is the heading of a column in a table.
Then I modify the match coordinates to look for the first row of the table (rDesc.getY()+24), the highlighting of the match confirm me that the position is correct.
But then when I do the OCR the returned string is the OCR of the heading, not the content of the cell.
To get the content of the cell I have to use the 2 commented lines below that builds a region with the same coordinates of the Match.
From my understanding it should work also without using the Region explicit assignment.
The question is: what do I missed?

rDesc=find("Heading.png")
rDesc.setY(rDesc.getY()+24)
rDesc.highlight(1)
str1Desc=ocr.getLineText(rDesc)
# rAppoDesc=Region(rDesc.getX(),rDesc.getY(),rDesc.getW(),rDesc.getH())
# str1Desc=ocr.getLineText(rAppoDesc)

My config is:
2.0.4-2020-03-14_08:01/Windows10.0/Java8(64)1.8.0_251-b08

I found a workaround so this is not a "bloking" issue, but I'd like to know what's wrong...
Thanks for support

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2020-06-24
Last query:
2020-06-24
Last reply:
2020-06-24
Best RaiMan (raimund-hocke) said : #1

see bug 1883605

the workaround you found has to be used until 2.0.5 is ready.

simpler in your case:

rDesc=Region(find("Heading.png"))
rDesc.setY(rDesc.getY()+24)
rDesc.highlight(1)
str1Desc=ocr.getLineText(rDesc)

matteoa (matteoa) said : #2

Thanks RaiMan, that solved my question.

matteoa (matteoa) said : #3

thanks a lot!!
do you have idea about when the 2.0.5 will be published?

RaiMan (raimund-hocke) said : #4

2.0.5: sorry, no commitments - as usual, but asap ;-)