Skip to main content

画像認識のアクションのエラーについての相談になります。

Windows11に更新した後に、画像認識のアクションでエラーが発生するようになりました。

エラーメッセージは、”画像が見つかりません。画像が画面に存在していることを確認してからもう一度お試しください。”となっていますが、対象の画像は画面に存在しています。

エラーが起きる状況は、Bot RunnnerでBotのスケジュール実行を対象のパソコンを閉じている状態で実行した場合です。

リモート接続で対象のパソコンの画面を見れる状態で同様に実行した場合は、エラーが起きずに正常に動作します。

PCの解像度は更新前と同じ状態になっており、原因が把握できておりません。

何か他に思い当たる原因や解決策をご教示頂けますと幸いです。

I need a consultation about the error of the action of image recognition.

An error is now reported in the image recognition action after updating to Windows11.

The error message says, “Image not found. Make sure the image is on the screen and try again.” However, the target image is present on the screen.

The error occurs when the bot runnner runs the bot schedule execution while the target computer is closed.

If you run it in the same way with the screen of the target computer can be seen on the remote connection, it will work normally without any errors.

The PC's resolution is in the same state as before the update, and the cause is not known.

I would be grateful if you could tell me any other possible causes and solutions.

Image recognition may be picking up some differences in how Windows 11 renders objects versus how Windows 10 rendered objects.

As you mentioned, resolution does matter. So does the zoom level and even color (bit) depth.

I might work with the “Match percentage” and tweak the tolerances. Lower = less precise match.

 


Hello There,

Thanks for the detailed explanation — this issue is quite common when using image-based automation, especially after OS upgrades like moving to Windows 11.

You're right that image recognition can fail even when the image is clearly visible. A few things to consider here:

  1. Session Rendering: The main issue seems to be that the bot is trying to run in a session that isn’t active or visible (like when the computer is locked or RDP is closed). In such cases, the screen isn’t fully rendered by Windows, so the bot can’t detect the image. Keeping an active session (or using tscon to attach the bot to the console session) is key.

  2. Rendering Differences in Windows 11: As mentioned, Windows 11 may render certain UI elements slightly differently than Windows 10 — even minor variations in anti-aliasing, color depth, or control styles can throw off image matching.

  3. Zoom and Display Settings: Even if the resolution is unchanged, double-check:

    • Display scaling (set it to 100% if possible).

    • Color depth (32-bit recommended).

    • Ensure consistent display settings between dev and prod machines.

  4. Match Percentage: Try adjusting the match tolerance. Reducing the percentage (e.g., from 90% to 80%) can help the bot recognize images that are just slightly different from the reference.

  5. Better Alternatives: Where possible, consider switching to object-based automation or using Computer Vision (if your license supports it), which is far more resilient to UI rendering changes.

Let me know if you want help implementing any of this — happy to assist.

Best,
Madhu


Hello There,

Thanks for the detailed explanation — this issue is quite common when using image-based automation, especially after OS upgrades like moving to Windows 11.

You're right that image recognition can fail even when the image is clearly visible. A few things to consider here:

  1. Session Rendering: The main issue seems to be that the bot is trying to run in a session that isn’t active or visible (like when the computer is locked or RDP is closed). In such cases, the screen isn’t fully rendered by Windows, so the bot can’t detect the image. Keeping an active session (or using tscon to attach the bot to the console session) is key.

  2. Rendering Differences in Windows 11: As mentioned, Windows 11 may render certain UI elements slightly differently than Windows 10 — even minor variations in anti-aliasing, color depth, or control styles can throw off image matching.

  3. Zoom and Display Settings: Even if the resolution is unchanged, double-check:

    • Display scaling (set it to 100% if possible).

    • Color depth (32-bit recommended).

    • Ensure consistent display settings between dev and prod machines.

  4. Match Percentage: Try adjusting the match tolerance. Reducing the percentage (e.g., from 90% to 80%) can help the bot recognize images that are just slightly different from the reference.

  5. Better Alternatives: Where possible, consider switching to object-based automation or using Computer Vision (if your license supports it), which is far more resilient to UI rendering changes.

Let me know if you want help implementing any of this — happy to assist.

Best,
Madhu

To add on ​@madhu subbegowda ,

  • Console Session Reattachment (tscon): Even if the bot is triggered via schedule, it might be running in a disconnected session. Using the tscon command can force the bot to reattach to the console session and render the UI properly — helpful for image recognition to work during unattended runs.
  • Runtime Screenshot Logging: To better debug image recognition issues, capture and log screenshots during bot execution. This can reveal what the bot actually sees and help pinpoint mismatches caused by resolution, scaling, or locked sessions.

Reply