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
PS: when using for instance "for i from 0..100 READBMP("Imagei.bmp") won't work ofcourse.
Many thanks in advance
RE: Batch Reading BMP Files
Did you read the definitions of the string functions?
TTFN
RE: Batch Reading BMP Files
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
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