Python Forum
Python openCV "img" is not defined error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python openCV "img" is not defined error
#3
(Apr-23-2018, 12:15 PM)buran Wrote: Please, post your full code (minimal runnable script).
My guess is img is a variable, defined in the example code somewhere before that line and it is missing (i.e. it is not defined yet, or you are using different name) in your code.

You're right. img represented an image file that was read before writing. Thank you!
Reply


Messages In This Thread
RE: Python openCV "img" is not defined error - by Arontbt - Apr-23-2018, 07:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with using opencv in python Raunak1023984765 21 1,639 Feb-21-2024, 04:25 PM
Last Post: Pedroski55
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 572 Nov-23-2023, 02:53 PM
Last Post: rob101
  [variable] is not defined error arises despite variable being defined TheTypicalDoge 4 2,124 Apr-05-2022, 04:55 AM
Last Post: deanhystad
  Error 'Contour' not Defined DaveG 3 2,348 Mar-13-2022, 03:29 AM
Last Post: deanhystad
  Screen capture opencv - grab error Kalman15 1 1,595 Jan-27-2022, 12:22 PM
Last Post: buran
  Help for the shortest way to install a suitable version of Python, Numpy, and OpenCV. Ezzat 2 2,275 Dec-23-2021, 12:34 PM
Last Post: snippsat
  Getting "name 'get_weather' is not defined error and no json_data returned? trthskr4 6 3,596 Sep-14-2021, 09:55 AM
Last Post: trthskr4
  Python OpenCV window not opening in fullscreen mode Zman350x 0 3,291 Apr-29-2021, 07:54 PM
Last Post: Zman350x
  Error when refering to class defined in 'main' in an imported module HeRo 2 2,376 Apr-13-2021, 07:22 PM
Last Post: HeRo
  Why does lambda throw 'name value_o is not defined' error? karabakh 3 2,176 Dec-14-2020, 05:45 PM
Last Post: karabakh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020