1
I’m a beginner in python, but I have experience with other programming languages. I need to do some college work, but I don’t know how to proceed. I would like to know how to adjust the range of an image using python, I downloaded some image processing libraries (like opencv). I wonder if there is a function that does this in python or if it does not exist, could you tell me what would be the process to make this adjustment? Because knowing the process I can create the algorithm in the "hand".
NOTE: if possible, avoid responses based only on external links, that is, do not leave only the link to an external page as a response.
OBS2: I have nothing "ready", just reading the image using opencv.
import cv2
imagem = cv2.imread("../Imagens/im01.jpg");
Out of curiosity, why not accept links that are not from the OS? And if it is necessary to cite the official documentation of the tool?
– Woss
opa @Andersoncarloswoss, links to documentation reference are very welcome. What I meant by avoiding external links is that some users only put as a response the link to some external site and if that site falls in the future, someone who will have the same problem that I will not be able to get the solution. I have been through this several times, I find a solution that leads to an external link, but the page no longer exists. Understood what I meant?
– CloudAC
Now yes, so it would be more explicit in the question put "avoid response only based on links", but this is also unnecessary, because this is one of the internal philosophies of the community and if there is an answer like this it will be notified and possibly removed.
– Woss
@Andersoncarloswoss understood, I will edit the question with your suggestion.
– CloudAC
Hello. You say this is a college job, so I understand that it’s part of your learning to learn how to do the program. Your question is valid, but you essentially say, "Does anyone have the code ready?". Well, in the documentation you find the code ready, have you even looked at it? And a simple search for "gamma Correction opencv" on the Internet returns a lot of cool material, such as: https://www.pyimagesearch.com/2015/10/05/opencv-gamma-correction/ It is not my bad will to answer, but I think it will help you more if you try something before. :)
– Luiz Vieira
@Luizvieira understood Luiz, I think I ended up expressing myself badly, I’m sorry for that. The intention of my question was to know if there was already any function in the python that already did this and if it did not exist, to know what would be the procedures to do this (in this case, the theoretical steps), because I am totally secular in this subject of image processing. Knowing the process, I would create the algorithm myself without problems. But thanks for answering, I will look at the link you passed and in case I manage to solve the problem, I will leave an answer for future users.
– CloudAC
No problem. : ) By the way, remember that you are very welcome to always post here! I just think that , more interesting questions (which, by the way, generate more reputation) are those with better described/characterized problems. On understanding the process, a good reading source is this: http://www.cambridgeincolour.com/tutorials/gamma-correction.htm
– Luiz Vieira