cant find image in a region when i create a pattern object

Asked by Jitender Arora

Hi,

Can anyone please help:

file_number_path = "/images/abc/image_name.png"
number_region=table_region.exists(file_number_path)

This code successfully finds the image however when i do the following:
file_number_path = "/images/abc/image_name.png"
number_place_pattern= Pattern(file_number_path).similar(95)
number_region=table_region.exists(number_place_pattern)

The code fails. I also tested by using direct find functions from the IDE and setting the match ratio to 95% even then it works, however when i use it like a pattern it fails

My sikuli version is 1.1.3 and Mac OS

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

is a question

Revision history for this message
RaiMan (raimund-hocke) said :
#2

wrong: number_place_pattern= Pattern(file_number_path).similar(95)

the similarity must be a fraction between 0 and 1
number_place_pattern= Pattern(file_number_path).similar(0.95)

--- I also tested by using direct find functions from the IDE and setting the match ratio to 95% even then it works
I guess, you are talking about the IDE Preview.

Can you help with this problem?

Provide an answer of your own, or ask Jitender Arora for more information if necessary.

To post a message you must log in.