Can't find the scanned image - return-value

I used os.system to call the scanimage command, it works fine but I can't find the scanned image !
any help?
thanks in advance
os.system ('scanimage > ~/test.pnm')

Related

dump all memory of perl script in certain point to an image

Can I make some kind of dump file , which contains all the variables / objects / params that a script has , in a certain point of a script , so I can then start my script from this point again without the need to load them again and just load them from the file ?
I hope I was clear enough..
thanks !

Cannot create .xlsx file in Octave 3.8.2

I have just switched from Matlab to Octave 3.8.2 and spending a lot of hours to rewrite my programs.
The issue I am currently having is related to io pkg's xlswrite function.
In the code I have implemented, my Matlab code would search a directory for an .xlsx file with a given name. If there was such a file, it would change the filename to filename_v2 and write data in it , else it would create it first and then write data in it.
However, Octave doesn't seem to work this way.
Actually, whenever I am trying to create a file using xlswrite function I get the following error:
error: xlsopen.m: file filename.xlsx not found
Any idea how I could go round this problem?
Thank you very much in advance.
Kostas
EDIT: I am using Windows 7 and the exact code is:
if exist('Data Logger.xlsx','file')==0
name='Data Logger.xlsx';
else
found=1;
v=1;
while found==1
v=v+1;
name_cand=strcat('Data Logger_v',num2str(v),'.xlsx');
if exist(name_cand,'file')==0
found=0;
end
end
name=name_cand;
end
xlswrite(name,Header)
Solved: Its seems that Octave does not accept spaces in filenames.
Changed Data Logger.xlsx to Data_Logger.xlsx and everything worked perfectly
Thank you all for your willingness to help.
Cheers, Kostas

Matlab Will Not Add Path

I am trying to call a function from the command window, but I constantly am obstacle by the message
Undefined function 'gDiscrPdfRnd' for
input arguments of type 'double'.
So, I searched this messaged in google. According to this post here, a possible cause for this is that matlab can not find the file. I found this page which tells of how to add the path. So, I typed in the command
addpath('C:\Users\Eli\Documents\MATLAB\final project\help')
and then I typed in
which gDiscrPdfRnd
which gave me the error 'gDiscrPdfRnd' not found. How can I fix this?
EDIT: The output of cd('C:\Users\Eli\Documents\MATLAB\final project\help');dir is
. IdealGasSimulation.zip randpdf
.. gDiscrPdfRnd funct randpdf.zip
IdealGasSimulation gDiscrPdfRnd funct.zip
There is no file gDiscrPdfRnd.m in the folder, put it into the help directory or add the folder where the gDiscrPdfRnd.m is placed.

Error in calling ImageMagick from Matlab

I have installed ImageMagick in my system (windows), and its commands are there in system PATH. Its working absolutely fine through Command line
I want to call the "convert" function of ImageMagick from Matlab using system command.
'C:\Users\Vivek' is the Path to image. I have to test working of ImageMagick through Matlab, as i need it in further processing (Making input suitable to Tesseract OCR)
cmd= ['convert ' 'C:\Users\Vivek\208.jpg ' 'C:\Users\Vivek\208.png']
system(cmd);
It says Invalid Parameter - C:\Users\Vivek\208.png, I tried some other ways. But, all the time the problem is with the second parameters.
Need Help
Thanks
Windows comes with its own convert program, and it looks like you're calling that one because it's first on the path in this context. It's described here on ImageMagick's site: http://www.imagemagick.org/Usage/windows/#convert_issue
I do not have ImageMagick installed, and I get the same error message when I try calling convert. That's consistent with your code getting the wrong convert program.
C:\Users\janke>convert C:\Users\Vivek\286.jpg C:\Users\Vivek\208.png
Invalid Parameter - C:\Users\Vivek\208.png
Specify the full path to ImageMagick's convert program and it should work for you.
The solution mentioned in the last post is the standard way to solve the issue, but the simplest way to do this is to just rename the ImageMagick's convert.exe file to something else, like convert1.exe, and use this filename in your scripts.

reading classical ini file on iPhone

does anybody knows how to parse an ini file ? I guess I need a regular expression or something.
I have only this pattern in the file :
varName=value;
Thanks a lot !
update : here you go : https://github.com/DrMoriarty/MetroEditor/tree/master/MetroEditor/ini
There's an INI file parser written in objective C available here - either use it directly, or read the source to pick up a few tips.
EDIT: as that link appears dead, try this alternative - thanks mc007