so i have this line code and this error pops up can anyone plz help me fix it and thank you in advance

조회 수: 1(최근 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.

채택된 답변

DGM
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개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by