so i have this line code and this error pops up can anyone plz help me fix it and thank you in advance
2 次查看(过去 30 天)
显示 更早的评论
app.TempEffect=imadjust(app.Modified,[app.LowR app.LowG app.LowB;app.HighR app.HighG app.HighB],[]);
the error says Error using imadjust>checkRange
Function imadjust expected its second input argument, [LOW_IN; HIGH_IN]
to be a two-element vector.
1 个评论
采纳的回答
DGM
2022-11-30
编辑:DGM
2022-11-30
When given an RGB image, imadjust() will accept input and output levels specified either as a 2-element vector (same levels for each channel) or as a 2x3 element matrix (each column represents the levels for each respective channel)
When given a single channel image (I), imadjust() accepts only a 2-element vector and will return an error if given limits for an RGB image.
If this is an app you're writing, you'll have to deal with grayscale and RGB images accordingly. Instead of having a bazillion CBFs for each control, I have one CBF that handles all the sliders and it simply adjusts the appropriate element of the levels array and updates the working image and display. The number of sliders that are enabled and the size of the levels arrays is determined by the depth of the image when it's imported.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!