Error using imadjust>checkRange (line 306) Function imadjust expected its second input argument, [LOW_IN; HIGH_IN] photo editing
1 view (last 30 days)
Show older comments
hi every one , I am tray to do Photo editor but i have her eror , what the wrong?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/413128/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/413128/image.png)
0 Comments
Answers (1)
Image Analyst
on 13 Nov 2020
imadjust() does not work with RGB images, so it can't take scaling parameters for each color channel. If you want to brighten your RGB image for display, use rescale().
9 Comments
Walter Roberson
on 14 Nov 2020
assert(isscalar(app.LowR), "LowR is size %s", mat2str(size (app.LowR)))
and similar for the other bounds
DGM
on 13 Nov 2022
imadjust() does support RGB and full 2x3 limit specification for both lower and upper bounds, and it has for years prior to 2020. The following code was tested in R2009b:
A = imread('peppers.png');
B = imadjust(A,[0.1 0.2 0.3; 0.9 0.9 0.9],[0.1 0.2 0.3; 0.8 0.9 1],1);
imshow(B)
... but it won't work if the input image is single-channel and you give it overspecified limit parameters. Check your input images for class and depth and handle them accordingly.
A = imread('cameraman.tif');
B = imadjust(A,[0.1 0.2 0.3; 0.9 0.9 0.9],[0.1 0.2 0.3; 0.8 0.9 1],1);
It also doesn't support RGB inputs for the short (implicit lower bound) syntax. That requires the explicit use of stretchlim().
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!