what does this line means in the following code? I=I(200:400,250:450,:); and when i change the ratio there comes an error of "index exceeds matrix dimensions"
Show older comments
I=imread('images/Persepolis_Taureaux.jpg');
I=I(200:400,250:450,:);% about M1:60second % M2:70second % M3:60second
tic
S=regcovsmooth(I,10,4,0.2,'M1');
toc
Accepted Answer
More Answers (2)
I am assuming that you are particularly asking about regcovsmooth function. This function is used for preserving image smoothing via region covariances. The output S is the structure component extracted from input image I.
Please read the research paper at the link given below,
Image Analyst
on 18 Apr 2017
regcovsmooth
It probably wants a gray scale image, not a color image. At least that's what I'd try to get rid of the error message.
tic
I = rgb2gray(I);
S = regcovsmooth(I,10,4,0.2,'M1');
By the way, please pick a more descriptive variable name than I. It looks too must like 1 (one) and l (lower case L).
5 Comments
misbah mateen
on 19 Apr 2017
Image Analyst
on 19 Apr 2017
Since none of us have the code for regcovsmooth() and only you do, you're on your own, unless you decide to give us all the code we need to run your program.
Andrew Newell
on 19 Apr 2017
Another option would be to contact the creator of that function.
msahar
on 19 Apr 2017
Link to regcovsmooth
Image Analyst
on 19 Apr 2017
The code has virtually no comments and that makes it very hard for someone other than the author to support it. Either that was their intent, or they just don't write very good code. I'd have to spend quite a bit of time to understand what that code does, and you can do that just as well as we can. I suggest you contact the author.
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!