×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Batch Reading BMP Files

Batch Reading BMP Files

Batch Reading BMP Files

(OP)
Does anyone know it is possible to read multiple files into matchcad using 1 command. My BMP's are called Image0.bmp, Image1.bmp, ... etc. I need to convert them to matrices containing the grey values. Out of these matrices I need to extract grey values and then I wish to write these values into a file. Because I do not whish to load over a 100 BMP's into Matchcad manually, I was hoping anyone could help me.

PS: when using for instance "for i from 0..100 READBMP("Imagei.bmp") won't work ofcourse.

Many thanks in advance
Replies continue below

Recommended for you

RE: Batch Reading BMP Files

Why "of course?"

Did you read the definitions of the string functions?

TTFN



RE: Batch Reading BMP Files

What version of Mcad are you using?

Current versions allow the argument of read/write commands to be a variable as below:
images:= |a<-"c:/folder/image"
         |for i from 0...100
         |  file<-concat(a,num2str(i),".bmp")
         |  output(sub i) <- READBMP(file)
         |output

However, I believe that older versions did not allow this.  I'm not sure when that changed, maybe with v11?

Peter

RE: Batch Reading BMP Files

(OP)
Thanks guys,

I have MatchCad version 11.0a. My first screening of the tutorials was not succesful. That's why I assumed it wasn't possible. I'll start looking it up right now. Hopefully my  Mathcad version allows this.

Thank you for a quick reply!

Mike

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close