MATLAB Help

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

Post Reply
User avatar
Academia Nut
Sith Devotee
Posts: 2598
Joined: 2005-08-23 10:44pm
Location: Edmonton, Alberta

MATLAB Help

Post by Academia Nut »

This might go better in G&C or in Testing, but I figured since its math and science related here would be the best place for it. Anyway, I'm trying to use MATLAB to do a Fourier transform on images, but I can't find anything on how to actually get images into MATLAB so that I can perform the transform on them, because I have found a function to do that and then do the inverse transform. So for all of you out there with more experience with the program, how exactly can I import and/or create images in MATLAB. Also, since this is for a spatial filtering lab, how do I edit images? I figure that would probably go along with my first question, but you never can tell.
I love learning. Teach me. I will listen.
You know, if Christian dogma included a ten-foot tall Jesus walking around in battle armor and smashing retarded cultists with a gaint mace, I might just convert - Noble Ire on Jesus smashing Scientologists
User avatar
Wyrm
Jedi Council Member
Posts: 2206
Joined: 2005-09-02 01:10pm
Location: In the sand, pooping hallucinogenic goodness.

Post by Wyrm »

imread and imwrite is for the basic image I/O — consult their help files. I do know you need to convert the matrix produced by imread to a double matrix to do any sort of math with it. I'm not sure what to use to convert the image back to an image format for imwrite (it's been too damn long).
Darth Wong on Strollers vs. Assholes: "There were days when I wished that my stroller had weapons on it."
wilfulton on Bible genetics: "If two screaming lunatics copulate in front of another screaming lunatic, the result will be yet another screaming lunatic. 8)"
SirNitram: "The nation of France is a theory, not a fact. It should therefore be approached with an open mind, and critically debated and considered."

Cornivore! | BAN-WATCH CANE: XVII | WWJDFAKB? - What Would Jesus Do... For a Klondike Bar? | Evil Bayesian Conspiracy
fnord
Jedi Knight
Posts: 950
Joined: 2005-09-18 08:09am
Location: You're not cleared for that

Post by fnord »

imread may be what you're looking for. What type of image(s) are you trying to load?
User avatar
Academia Nut
Sith Devotee
Posts: 2598
Joined: 2005-08-23 10:44pm
Location: Edmonton, Alberta

Post by Academia Nut »

Hey thanks, that really helped. Mostly I'm trying to load simple black and white images for the purposes of examining how the various image gratings and such are transformed.
I love learning. Teach me. I will listen.
You know, if Christian dogma included a ten-foot tall Jesus walking around in battle armor and smashing retarded cultists with a gaint mace, I might just convert - Noble Ire on Jesus smashing Scientologists
User avatar
Nephtys
Sith Acolyte
Posts: 6227
Joined: 2005-04-02 10:54pm
Location: South Cali... where life is cheap!

Post by Nephtys »

imwrite(variable,'filename.ext') I believe is the syntax, but you can look it up with doc inwrite.
User avatar
raptor3x
Padawan Learner
Posts: 167
Joined: 2005-07-04 11:34pm
Location: University Park, PA
Contact:

Post by raptor3x »

On a side note, I'm not sure how long your Fourier transforms are taking or how many you have to do, but if you have the equipment (Nvidia 8800 or greater series video card) you should try their matlab CUDA plugin. Incredible speedup over a regular CPU.
The best part of being a mad scientist is never having to ask yourself, "Should I really be doing this?"

"Liberals tend to clump together in places where they can avoid reality and diversity of opinion, like big cities, especially in the east and west coast and college towns." --nettadave2006


"Googles methods are a secret black box and some left leaning folks sit on it's board. I've noticed an imbalance when I search certain other topics related to Obama or other hot button topics, especially in the first page or two of results given.."--nettadave2006
Post Reply