How to change brightness of selected points of an image?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I know that I can change brightness of an image using following instruction:
I=(readimage);
I1 = I - 100;
imshow(I1);
But I want to know that How can I change brightness of the image just in some specified points? For example a square of the image?
2 commentaires
Réponses (1)
Image Analyst
le 18 Oct 2018
Try ginput():
uiwait(helpdlg('Click a point'));
[x, y] = ginput(1);
row = round(y);
col = round(x);
thisGrayLevel = grayImage(row, col);
grayImage(row, col) = thisGrayLevel ^2;
Beware that if your image is uint8 and the square goes beyond 255, it will clip to 255.
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!