If only rotating tires were really this easy! After graduate school, I drove east for my post-doc at Woods Hole Oceanographic Institution. In late winter, I noticed that my tires still had red dust on them from visiting national parks in Utah. So I took a picture and later realized that my tire wasn't oriented for easily reading the make of the car.
Contents
Some Simple Image Processing
Today I am going to use some features from Image Processing Toolbox. You might also benefit from reading Steve's blog on image processing.
Read an Image
Here's a gray-scale image of my tire photo.
I = imread('tire.tif'); whos I colormap(gray(256)) image(I), axis image, axis off
Name Size Bytes Class Attributes I 205x232 47560 uint8
Crop the Image
Next I want to select the hub to look at it more closely. I happen to know that region I want to look at, having already used imcrop interactively earlier to isolate the central portion.
rect = [90 74 41 41] midI = imcrop(I,rect); image(midI), axis image, axis off
rect =
90 74 41 41
Resize the Image
Next, I want to resize the image so I can see details better.
midI5 = imresize(midI,5); imshow(midI5)
Rotate the Image
Looking at the function imrotate, I see I specify the rotation I want in a counterclockwise sense. Eyeballing the angle, I choose 135 degrees.
midI5r = imrotate(midI5, 135); imshow(midI5r)
Check the Tire Rotation
Here's the rotated tire. Now you know what kind of car I drove across the country some years ago.
Ir = imrotate(I,135); imshow(Ir)
Quick Ideas?
Like today's blog, I occasionally enjoy trying out products in addition to MATLAB, in part so I can learn more about a particular domain or discipline. Have you used MATLAB or other MathWorks tools to teach yourself about some new technology or application? If so, please let me know here.
Get
the MATLAB code
Published with MATLAB® 7.5



loren, loren, loren
why did you not just rotate your photo a bit…
urs
ps: :-)
can you analyse the tires so it actually look flat?, through matlab?
Have you tried marketing this to Discount Tire Company? :)
Now guys, this is a serious blog posting. It brings up a very important and topic, and deserves a well-thought-out and sober reply.
In particular, I would like to understand what the whitish powdery substance is on the ground where the tire is rolling. Scientists here in my home state (Florida) have hypothesized that di-hydrogen-monoxide could, in extreme circumstances, achieve a solid or perhaps crystalline form. Such conditions do not occur in any natural state (of Florida, that is). They also fear that prolonged contact with this hazardous chemical while in its crystalline state could result in irreparable tissue damage, by transferring its crystalline state subcutaneously. Could we avoid the formation of this hazardous crystalline state of di-hydrogen monoxide by increasing the level of carbon dioxide in our Earth’s atmosphere?
So, what is it, and can MATLAB be used to help analyze it ;-)
Dihydrogen monoxide is a prevalent, controversial, possibly quite dangerous substance. See dhmo.org for more information.
hi
we are working on the signature recog project.. need some help regarding alignment of text in an image..
we want signature in horizontal position.. so please help us align those signatures which are at diff degrees with respect to horizontal..
thanking u in advance…
please do the needful at the earliest
Shree-
Please look at demos in the Image Processing Toolbox and contact technical support if you require more help.
–Loren
hi
thank you very much for the reply..
can u please help us regarding how to extract features in a signature.. please can u provide the matlab code for the same… we are trying to extract features …but due to lack of time… we are seeking ur help… please help us…
please do reply