Valid image commands for Student Version 7.12.0 (R2011a)

I am trying to get back into Matlab after a few years absence.
In trying to process images, some of the commands to which I find internet references do not seem to be recognised. These commands include imshow and regionprops.
I want to start by finding a centroid of a simple image, and as I get the hang of it, monitor consecutive images. Is it just that the version that I am using is too primitive for these commands? or is it that I need to install additional tools? and if so from where?

 Accepted Answer

Thank you Walter. That is good to know. Unfortunately I no longer have my installation disc.
I assume that I may be able to download that module to install it?

5 Comments

No, only one (or at most two) Student Versions are available to download at any time. Your R2011a is too old to still be available that way.
If you had active Software Maintenance Service then you would be able to download older versions of your software. However that service has never been available for Student Version licenses, so the Student Version of the toolkits are not (as far as I can see) made available through that service.
You would need to find your install disc, or buy an up-to-date Student Version, or buy the Professional Version, or find someone who happens to have a copy of the media for R2011a Student Version.
You could also appeal to Sales at Mathworks, but I would point out that in previous discussions when people have asked about this kind of thing, the response from Mathworks has been "We don't have that anymore."
Thank you Walter.
Subsequent to my last post I have been able to download and install the Image Processing Toolbox.
I have been able to write a very simple script that loads and shows an image.
Person = imread ('user.png'); % image (Person) imshow (Person)
Based on another reference that I found online ... BW = logical([1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0]); L = bwlabel(BW,4) [r,c] = find(L == 3) imshow (BW)
I've been able to create basic pictures from matrices, but when I try to use the regionprops options, I have not met with success.
EDU>> s = regionprops(Person, 'centroid'); EDU>> s
s =
2x1 struct array with fields: Centroid
I had hoped that this would give me an X-Y co-ordinate
Using online tutorials I also tried to load an avi file from the prompt
EDU>> mov=aviread ('constraint.avi')
constraint.avi is a simple file that I made with Inventor.
I then got this error
??? Error using ==> aviread at 84 Frames must be either 8-bit (Indexed or grayscale), 16-bit grayscale or 24-bit (TrueColor).
I checked the avi file with FILEINFO = AVIINFO('constraint.avi') Warning: AVIINFO will be removed in a future release. Use MMREADER instead. > In aviinfo at 68
FILEINFO =
Filename: 'C:\Users\BMW\Matlab\constraint.avi'
FileSize: 279662080
FileModDate: '06-Feb-2014 14:12:24'
NumFrames: 52
FramesPerSecond: 10
Width: 1616
Height: 832
ImageType: 'truecolor'
VideoCompression: 'none'
Quality: 0
NumColormapEntries: 0
So this suggested to me that Matlab recognised the avi file.
Is it just that the version of Matlab that I am using is simply too old to be of any use? The commands that I am trying to use just do not seem to work. Should I bite the bullet and upgrade. My aim here is to utilise te limited time that I have before semester starts again to refamiliarise and expand on knowledge that I have not utilised in about 5 years.
regionprops needs a binary or labeled image, not "Person" which you passed in which I assume is your original grayscale or RGB image.
What is "Inventor"? Does your code work with the standard rhinos.avi movie that it ships with?
Thank you for your responses. The 'Person' to which i referred was a black and white png file. I was able to load and view this file, but was not able to successfully utilise regionprops.
'Inventor' is a CAD modelling package. I simply used it to create a 50 frame AVI file of a black dot moving across a white background. From this I was hoping to be able to extract frames and then utilise regionprops. I have been able to locate copies of original installaion CD. I cannot find rhinos.avi.
To what does that refer?
Like I said, Person is not a binary or labeled image - it's a gray scale image. Just because it has black and white (0 and 255) does not mean it's a binary image with values of true and false. If you want all 255 pixels to be foreground, then you can threshold your image, then label it, and then pass it into regionprops:
Person = imread ('user.png'); % image (Person)
Person = Person > 128; % Threshold.
labeledImage = bwlabel(Person); % For use in regionprops.
imshow (Person);
If you have the Image Processing Toolbox installed, you should have this file: C:\Program Files\MATLAB\R2011a\toolbox\images\imdemos\rhinos.avi. It's a standard demo movie that the IPT ships with.

Sign in to comment.

More Answers (2)

Student Version (SV) had different toolboxes bundled with it to different times. If you type
ver
in the Command Window, it will tell you which tolboxes you have.
IMSHOW and REGIONPROPS are part of the Image Processing Toolbox and comes with today's SV
The R2011a Student Version did include the Image Processing Toolbox, but it was not installed by default. You need to go back to your installer and select it.

Community Treasure Hunt

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

Start Hunting!