Home>
I am editing images using numpy in python, but I don't know how to change BGR. . .
result [np.where (result [::, ::, (2,)]>50)] == 50
But the value of B will be minus 50
result [np.where (result [::, ::, (1,2)]>50)] == 50
Even so, the values of B and G are subtracted.
Finally, if the BGR G and R values are 50 or more, I want to make the G and B values -50. How should I write them?
-
Answer # 1
Related articles
- i want to change the row value using the value of the previous row in python: pandasdataframe
- i want to dynamically change the value of a variable in python and execute it
- i want to change the value of an element of a multidimensional array in python
- python - i want to change the value of the list using a function
- python - i want to change the ip address that the django app gets by default from remote_addr to http_x_forwarded_for in middlew
- python 3x - change row name/column name of csv file
- [python] [tkinter] i want to change the acquisition contents of the second and subsequent menu lists by selecting the previous p
- i want to change the default version of python
- c # - navmeshagent value does not change
- python - i want to speed up the calculation of for statements with numpy
- python - does pixel information change when cv2imwrite processing is performed?
- python - how to output the key and value in the dictionary in any form
- i want to set the maximum value of the slider in python to the number entered in the text box
- python 3x - change font size for python3 tkinter entry
- python 3x - how to get the value of scrolledtext
- if you change the value of the select box, the item of another select box will switch automatically jquery
- i want to get the value from a constant in python and display it
- about batch change of file name using python
- put the maximum value of the list of variables in the objective function with python pulp
- python - i want to change the csv file name every time i loop with the for in syntax and save it in the specified folder
Related questions
- python : Float matrix sum
- python : Matrix to NumPy conversion error
- python : Need help finding the index on the Series object s
- python : numpy: find maximum and minimum element from a range without using a loop
- python : How to remove data gaps in the set date
- python : How can I remove a string from a Numpy array by a given condition?
- python : How do I assign names to columns in an array?
- python : The neural network for the recognition of numbers does not work
- python : Building a nonlinear regression
- python : How to add conditions in a DataFrame
For example, if you want to reduce only the value of R, how about writing as follows?
result [np.where (result>[255,255,50])]-= 50
For G and R values:
result [np.where (result>[255,50,50])]-= 50
In the original code
result [np.where (result [::, ::, (2,)]>50)]
,result [::, ::, (2 ,)]
to determine the value for the image of the first channel, the index is obtained only for the value of the first channel → the first channel (Blue) to apply it to the image of the third channel ) Seems to have been applied only to.