Remove notice on using deprecated itemset

pull/26041/head
Kimberly N. McGuire 3 months ago committed by GitHub
parent 78630ddc67
commit b5b9b3a279
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      doc/py_tutorials/py_core/py_basic_ops/py_basic_ops.markdown

@ -51,23 +51,6 @@ You can modify the pixel values the same way.
Numpy is an optimized library for fast array calculations. So simply accessing each and every pixel
value and modifying it will be very slow and it is discouraged.
@note The above method is normally used for selecting a region of an array, say the first 5 rows
and last 3 columns. For individual pixel access, the Numpy array methods, array.item() and
array.itemset() are considered better. They always return a scalar, however, so if you want to access
all the B,G,R values, you will need to call array.item() separately for each value.
Better pixel accessing and editing method :
@code{.py}
# accessing RED value
>>> img.item(10,10,2)
59
# modifying RED value
>>> img.itemset((10,10,2),100)
>>> img.item(10,10,2)
100
@endcode
Accessing Image Properties
--------------------------

Loading…
Cancel
Save