Saving Vector of BufferedImages to binary .mat file

Hi,
I have a matlab file that reads in Binary .mat files. These files are made up of sections of images.
I've used Java to create these sections and therefore need to save the vector of bufferedimages to a .mat binary file.
I've been using the
File file = new File("test.mat");
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file));
out.writeObject(patches); syntax but when I attempted to read the file into my matlab code I got the following error:
Unable to read MAT-file patches\test.mat: not a binary MAT-file.Does anyone know how to save as a binary .mat file?
Cheers
N

I still can't find any sources of how to save a .mat
binary file in Java, unless I'm something glaringly
obvious on the page you posted (quite possible)
Most probably you are going to have to write lots of code to take your data and format it according to the 'mat' file specification. You might just be lucky an find code off the peg but I doubt it!
Be prepared for some late nights!

Similar Messages

  • How to open a .MAT file in LABVIEW

    Hey everyone,
    I currently have a .MAT image file which I would like to open in LABVIEW to apply some image filters. However, I am unsure as to how to open the .MAT file in LABVIEW. Ideally I would like to be able to open the .MAT file without using matlab, and it seems the only way to accomplish this task is through the mathscript node. I have attached an example of the image im trying to open, as well as the LABVIEW program which I would like to use on the image. Thanks for the feedback! =]
    Attachments:
    MAT_Image_Adjust.zip ‏1779 KB

    Hi Boiler,
    1) Do you have a choice in the format you export your data from MATLAB?
    "ASCII Format
    Complete the following steps if you want to import or export data between LabVIEW and the MATLAB® environment, the process is straightforward as long as you are using ASCII format.
    From the MATLAB® environment to LabVIEW
    To save a vector or a matrix Xin ASCII format with tab delimiter, enter the following in the command window or m-script file in the MATLAB® environment:   
    >>SAVE filename X -ascii -double -tabs
        This creates a file whose name is filename, and it contains the data X in ASCII format with a tab delimiter.
    Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Programming»File I/O palette.
    2) Have you tried using the mathscript node? Did you get any errors?
    "Binary Format
    Complete the following steps if you want to import or export data between LabVIEW and MATLAB®.
    From the MATLAB® environment to LabVIEW
    To read a .mat file in LabVIEW would require a VI to parse the file. This may be easier if each variable is saved to a separate file.
    " -- this was done here, no ideas if it still works,
    I want to read a Matlab MAT file into labview
    Hope this helps, James
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • I would like to know how i can save an byte array to a mat file format (matlab file format '*.mat') within to use the matlab API

    So, I search the binary matlab file format('*.mat').

    Title:
    Moving Data Between MATLAB® and LabVIEW
    Problem: 
    How can I share data between LabVIEW and the MATLAB environment?
    Solution: 
    MATLAB users can move data between the
    MATLAB environment and LabVIEW, you have several options. Prior to
    LabVIEW 5.1, the only way to transfer data between these two
    environments was to use the Save and Load functions. Those are discussed herein.
    Beginning
    in LabVIEW 8.0, MathScipt was introduced. MathScript is an integrated
    part of LabVIEW that you can use to combine intuitive graphical
    dataflow programming with math-oriented textual programming. See the
    attached links below for more information on MathScript.
    Beginning
    in LabVIEW 5.1, the MATLAB script node was introduced into the LabVIEW
    programming environment. The MATLAB script node makes ActiveX calls to
    the MATLAB software from within LabVIEW. This requires that both MATLAB
    be installed on the same machine and that a valid license is obtained.
    More information on the MATLAB script node can be found in the attached
    KB's.
    For all versions of LabVIEW, this data transfer can be
    performed by saving the data in a file using the MATLAB software and
    reading it directly from LabVIEW, or vice versa. In the MATLAB
    environment, the command "save" allows you to save the data in
    binary format (*.mat) or ASCII format. You also have an option of
    saving it in ASCII format using a tab delimiter between data points and
    the command "load" allows you to read in the data.
    ASCII Format
    Complete the following steps to import or export data between LabVIEW and the MATLAB environment using an ASCII file format.
    From the MATLAB environment to LabVIEW
    To save a vector or a matrix X in tab-delimited ASCII format, enter the following in the command window or m-script file in the MATLAB environment:
    >>SAVE filename X -ascii -double -tabs
    This creates a file named filename containing data X in tab-delimited ASCII format.
    Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Functions»File I/O palette.
    From LabVIEW to the MATLAB environment
    To export a matrix X from LabVIEW to the MATLAB environment, first save the data in ASCII format in LabVIEW using the Write To Spreadsheet File VI on the Functions » File I/O palette.
    Enter the following in the command window of the MATLAB environment, or in the m-script file:
    >> LOAD filename
    This reads the data into the MATLAB environment.
    Binary Format
    Complete the following steps to import or export data between LabVIEW and the MATLAB environment.
    From the MATLAB environment to LabVIEW
    As mentioned above, LabVIEW does not save multiple variables to one
    data with extra manipulation, and will not be discussed here.
    Therefore, the only way of sending the data from the MATLAB environment
    to LabVIEW without tampering with the MAT binary file structure is
    using the ASCII format. Also, please bear in mind that you need to have
    one file for one variable.
    From LabVIEW to the MATLAB environment
    Because
    the MATLAB software saves data in its own binary format, the "MAT"
    file, binary LabVIEW data must be converted to this format prior to
    transferring the data. The attached examples can be used to save
    LabVIEW data in the MATLAB software format. The convenience of the .MAT
    file format is that more than one variable can be saved in the same
    file. The example shows saving seven variables to .MAT format; the
    example can be modified for any number of variables.
    Once this data is saved from LabVIEW, it can be read into the MATLAB environment, using the following command:
    >>LOAD filename
    The Who
    command can then be used to display all the seven variable names, and
    you can display the content of them by entering the variable names at
    the command prompt as usual.
    MATLAB® is a
    registered trademark of The MathWorks, Inc. Other product and company
    names listed are trademarks and trade names of their respective
    companies.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • .mlv and .mat files

    Hi,
    I am running a code in a Mathscript node and saving some variables at the end of the execution in a file (.mlv).
    I understand that these file format is exclusive to Mathscript, but is there someway I can convert this to a .mat file so that it can be stored in a database and used with MATLAB later whenever needed?
    Any help or suggestions are appreciated.
    Thanks,
    Chintan

    Hi Grant,
    Thanks for your reply.
    I have tried the data analysis offline. While saving it in .mlv it saves all the variables perfectly. I tried using csvwrite and dlmwrite as well, but they just write random number instead of the variables I specify in the syntax.
    Here is the code I am using. The saving part at the bottom is what is bugging me. Everything else works fine. Please suggest another way to do this.
    Thanks,
    Chintan
    data=-load(dataf);           %load decay data
    head=load(headf);             %load header
    laser = load(laserf);        
    data_length=length(data);
    mode=head(1);           %Single=0, Multi=1, Filter=2
    tres=head(2)*10^9;      %resolution in ns
    switch mode
        case 0
            lamb_num=1;
            lambdas=head(12); %lambda summary
            lambda_vec=head(13+lamb_num:end);   %vector with wavelengths
            dec_num=head(10);
            rep_num=head(11);
            flag=0;
        case 1
            Wini=head(9);           %first wavelength (nm)
            Wend=head(10);           %final wavelength (nm)
            Wstp=head(8) ;          %steps (nm)
            lambdas=[Wini Wstp Wend];       %lambda summary
            lambda_vec= head(14:end-1);        %vector with wavelengths
            lamb_num=head(11)/head(12);        %number of wavelengths measured
            dec_num=head(11);
            Wini=head(9);           %first wavelength (nm)
            Wend=head(10);           %final wavelength (nm)
            Wstp=head(8) ;          %steps (nm)
            rep_num=head(12);
            gain = head(7);
            flag=0;
        case 2
            dec_num=head(9);
            rep_num=head(7);
            filter_wheel_pos=head(8);
            center_wavelenghts=head(13:end);
            flag=1;
    end
    lim=[30/tres 100/tres];
    trspec=data(lim(1):lim(2),;                                       %truncate data
    laser=laser(lim(1):lim(2),;
    trspec=trspec-ones(lim(2)-lim(1)+1,1)*mean(trspec(1:2/tres,);     %detrend (substract mean of first 2 ns)
    time_vec=[0:lim(2)-lim(1)]*tres;
    stspec=trapz(trspec);
    if flag==0
        save('Processed','mode','tres','dec_num','rep_num','lambda_vec','lambdas','trspec','stspec','time_vec','gain','laser');
    end
    if flag == 1
        save('Processed','mode','tres','dec_num','rep_num','trspec','stspec','time_vec','filter_wheel_pos','center_wavelenghts','fwhm');
    end

  • Error message:  "document may contain binary EPS file which can cause print failure"

    Can anyone help me with this error message?  I have an .indd file that contains about 20 logos and various images.  I was under the impression that using eps / ai / and psd file formats for printing was best in InDesign.  (It is a 25 page document).  When I try to print the document i get the error message that says:
    "This document may contain binary EPS files which can caise the print job to fail.  If the printer produces output then the binary datat did not interfere with printing. Do you want to print this document?"
    Well - my document did not print for me .. so hwo can I fix this?
    Thank you,
    Cmol

    There are many ways to fix this.
    Re-saving EPS files as AI is fine.
    Re-saving EPS files as PSD is a bad plan -- EPS files are vector graphics, and PSD typically aren't. Also, AI files are PDF files that are generally readable by many applications. PSD files, not so much, (though InDesign certainly can).
    (You could also re-save as an EPS file without 8-bit/binary data.)
    What does the error message mean? Well, EPS files are a type of PostScript file, and PostScript has many ways to store image data. It can be stored as 8-bit data, which is the most space-efficient. It can also be stored as base64 ascii, i.e. just letters and numbers and soforth, which takes up more space (I want to say 130% more?).
    Depending on exactly how your computer is connected to your printer, those 8-bit characters can cause problems and may not make it all the way to the printer. If that happens, then you get this problem. The warning message is there to let you know that if you have a non-8-bit-clean printing path, then you may have a problem.

  • Creating .mat files with Matlab dataplugin in LabVIEW

    I am trying to create a .mat file in LabVIEW using the Matlab dataplugin. It appears to create a group called "Vector" without being told to, and it also concatenates group and channel names together. I have made an example to demonstrate this behaviour. I am trying to create a group called "Group" and inside it a channel called "Channel". What I get looks like a group called "Vector" and inside it a channel called "GroupChannel". What am I doing wrong?
    Best Regards,
    John Sackett
    Solved!
    Go to Solution.
    Attachments:
    write mat example.zip ‏54 KB

    Hello John
    Thank you for getting in touch regarding your issue. I am an applications engineer here at National Instruments, as I understand you are using the data plugin for Matlab within LabVIEW, but as shown with your code when you label the channel or group you get an outcome which you don't expect.
    I have opened and had a look at your code and can see where the issue is arising. The functions you are using are normally used with TDM files, .MAT files are compatible but there are a few differences between the file formats, which is why you are getting the outcome we have seen. A TDM file has headers named channelgroup and channel, but Matlab does not have the channelgroup header in the file type and therefore the functions in LabVIEW merge the 2 strings to the available header.
    I am not able to open your .MAT file so could you give me a brief description of what occurs inside Matlab?
    Have you looked into using the script node to allow for .MAT file types in LabVIEW? Here is the help file
    I have also found some resources which you may find useful.
    LabVIEW to MATLAB
    Convert file
    Open .MAT in LAbVIEW
    DataPlugin
    Let me know if you would like any further information
    Regards
    Stephanie L
    Applications Engineer
    National Instruments UK and Ireland

  • Illustrator CS4 saving vector art for Microsoft Word

    I have a logo created in Illustrator CS4. I saved the file for use in Microsoft Office using the "save for Office", exporting as a .wmf, and even saving the vector art in Photoshop as a .png. I can get a variety of formats to work well in Word documents.
    Here is the problem. The Word document will eventually be saved as a PDF. When the file is saved as a PDF document (from Word), the color is changing in the PDF file. How can I correct this? I've tried saving in both rgb and cmyk color modes, but the color changes once it hits Acrobat and is printing differently than the Word file. It is driving me crazy and I cannot figure this out.
    Thanks for any help!
    Mary

    The type is not vector it is raster it is no longer outline.
    Check to see if you can select the individual letters in AI if you cannot it has be rasterized and is an image not vector.
    If you open my files you will see that they are selectable in Acrobat and AI.
    You seem confused and I do not understand why.
    Attached is a word file with vector art and type make a  pdf from that and see the difference.
    Also make certain you have Illustrator editing capabilities turned on when exporting to pdf from AI.
    Can you attach one of the eps or the esp you made the sample file from.
    Do not rasterize the outline text art.
    It won't let me attach a word document.

  • Saving Vector Images

    Please forgive me if this is answered somewhere. My searching skills are lacking, or I can't find quite what I'm looking for. I have two questions:
    I'm using the pen tool to draw a vector image (just an outline drawing, no fill) that will be saved as a pdf. The intent is for it to be a printable file for use as a (sewing) pattern. Part of the reason I'm using a vector image is so that the file can be made bigger or smaller to suit the user's needs. So, regarding saving the file and printing it, do I save it as a pdf just with the vector paths and achieve this? Or do I need to stroke the path before saving to the pdf? Or will stroking the path create a drawing without the vector-type (resizing) capabilities?
    Also, I don't really want the file to be editable, since I don't someone else reworking and "stealing" my pattern, but is there a way in pdfs to manipulate the image without using an editing program like Illustrator? If, for example, the user wanted to move part of an image to another place on the page?
    I'm a total newbie, so I appreciate your help!

    mygenaddy,
    I'm using the pen tool to draw a vector image (just an outline drawing, no fill) that will be saved as a pdf. The intent is for it to be a printable file for use as a (sewing) pattern. Part of the reason I'm using a vector image is so that the file can be made bigger or smaller to suit the user's needs. So, regarding saving the file and printing it, do I save it as a pdf just with the vector paths and achieve this? Or do I need to stroke the path before saving to the pdf? Or will stroking the path create a drawing without the vector-type (resizing) capabilities? Stroking the path does not change its being vector, but it makes it visible.
    Also, I don't really want the file to be editable, since I don't someone else reworking and "stealing" my pattern, but is there a way in pdfs to manipulate the image without using an editing program like Illustrator? If, for example, the user wanted to move part of an image to another place on the page? A PDF without Illustrator  Editing Capabilities (saving option) will put a certain limt to the editability, however not with such simple artwork. To be certain, you will have to use a raster format, but that is not scalable.
    I'm a total newbie, so I appreciate your help!

  • I want to read a Matlab MAT file into labview.

    I do not have Matlab.  I have a series of *.mat files that are created by another program that I want to read into LabVIEW.  The *.mat files should contain a very long 2 dimensional array of complex numbers, with only 2 columns.  I am hoping that the *.mat format is straight forward.  I need to read this into a LabVIEW array to manipulate it.
    Has this been done?  I've found several routines that allow you to save data from LabVIEW into a *.mat file so that Matlab can read it, but I have not seen anything that goes in my direction.  Any help is appreciated.
    Mike

    Oh, yeah, that certainly makes a big difference.
    You're even luckier that I was still bored, so I whipped something together.
    See attached.
    Couple of things:
    (1) I couldn't test it for all data types so the "Parse Data" VI may need to be tweaked for some of the data types.
    (2) Your file contained multiple variables and the one matrix of complex values was a 1D array so you may need to insert a "Transpose 2D Array" function where the bundle function is for your 2D array.
    (3) A couple of the variables were character arrays but Matlab stores the individual characters as floating point numbers between 0 and 255 representing ASCII-encoded characters. These are the "XUnit" and "YUnit" arrays.
    For your reference, the MAT file format is at http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf
    Oh, I think I may have left breakpoints in when I saved the VI. Sorry about that. You should remove them when you run the VI so they don't become annoying.
    Message Edited by smercurio_fc on 02-09-2006 05:07 PM
    Attachments:
    Read Level 4 MAT File.zip ‏69 KB

  • FFT of waveform (lvm file converted from mat file) - how do I overcome dt error =0?

    Hi,
    I am using an lvm file after conversion from mat file. I wanted to get the fft  spectrum.I keep getting this error that waveform dt<=0.
    How do I overcome it?
    I have attached the mat file and the vi i used.
    Best regards,
    Fesmi
    Solved!
    Go to Solution.

    The Forum is somewhat particular about the files which may be attached. Often creating a zip file works. Sometimes you can change the extension to .txt. If you change the extension, please indicate in your post what the orignal extension was.
    It appears that the data in the file has a time column and an amplitude column. The LabVIEW waveform datatype is a cluster of an array of amplitudes (Y), sampling interval (dt), starting time (t0), and optional attributes. This is what the Power Spectrum VI requires as an input. The t0 values is not used so the defualt is fine. the dt value can be calculated from the difference of any two adjacent values in the time column. Since the first value is zero, the second value is equal to dt.  Use the Build Waveform primitive from the Waveform palette.  Expand it to show the dt element.
    In the attached VI all rows is an indicator which contains the data from your file saved as default. XY Graph plots that data.  After subtracting the mean to get rid of a DC component, the data is converted to a waveform. The power spectrum is calculated and displayed using the same VI as in your program. It also uses Extract Multiple Tone Information.vi to get the frequency and amplitude of the major peaks in the data.
    Interestingly the low frequency part of the spectrum has strong harmonics of 60 Hz while the peaks near 4 kHz are space ~100 Hz apart.  The broad peak near 2.1 kHz does not seem to have noticeable components at either 60 or 100 Hz.
    How do you avoid the Dynamic Data Type (DDT)? Stop using Express VIs! For reasons only known to NI, Express VIs deliver their outputs via DDT. Except by opening the block diagram of the express VI, there is no way to tell what the underlying data structure on a DDT wire is. 
    Lynn
    Attachments:
    FFT of Waveforms.vi ‏711 KB

  • I exported an indesign file as a pdf saved to my desktop, now all indesign files on desktop are turned to pdf. HELP PLEASE

    I exported an indesign file as a pdf saved to my desktop, now all indesign files on desktop are turned to pdf. HELP PLEASE

    If you are using Mac, press Apple + I to get the information. It show a table. There is a section call Open with. Change the file with pdf icon to open with indesign. If using PC, just click on the second button on the mouse and open with Indesign.

  • How to implement reading data from a mat file on a cRIO?

    Hi all!
    I am not even sure, this is plausible, but I'd rather ask before i start complicating. So far, I have not found any helpful info about reading in data to a RT device from a file (kind of a simulation test - the data is simulated). 
    I have the MatLab plugin that allows the data storage read a MAT file, which has a number of colums representing different signals and lines representing the samples at a given time (based on the sample time - each sample time has it's own line of signal data). 
    I have no idea of how to implement this to cRIO.
    The idea is:
    I have some algorithms that run on the RIO controller in a timed loop. As the inputs to these algorithms, i would need to acces each of the columns values in the line, that corresponds to the sample time (kind of a time series - without the actual times written).
    I am fairly new to RT and LV development, so any help would be much appreciated.
    Thanks, 
    Luka
    Solved!
    Go to Solution.

    Hi Luka!
    MAT file support in LabVIEW is handled by DataPlugins. Here you can find the MATLAb plugin:
    http://zone.ni.com/devzone/cda/epd/p/id/4178
    And here you can find information on how to use DataPlugins to read or write files of a certain format:
    http://www.ni.com/white-paper/11951/en
    There is also an open-source project that addresses the problem, you can find it at
    http://matio-labview.sourceforge.net/
    Unfortunately, RT systems are not supported by DataPlugins, so fist you'll have to write a VI on the Host computer to convert your files to a usable format (I suggest TMDS for compactness and ease of use), and the work on the converted files in the cRIO VI. If you have other questions about DataPlugins or anything else, please get back to me.
    Best regards:
    Andrew Valko
    National Instruments
    Andrew Valko
    National Instruments Hungary

  • Creating a Mavericks USB boot drive after the horse has bolted.  Can I create a bootable USB drive from my iMac after installing Mavericks without saving the Install OS X Mavericks.app file?  Do I need to re- download the whole 5.29 Gb again?

    Creating a Mavericks USB boot drive after the horse has bolted.  Can I create a bootable USB drive from my iMac after installing Mavericks without saving the Install OS X Mavericks.app file?  Do I need to re- download the whole 5.29 Gb from the App Store again?  My problem is my 4Gb/month allowance on a 12 month contract.  I cannot purchase a data block from my ISP and although my speed is theoretically slowed to 64k after reaching my 4Gb, it actually ceases to download in reality.

    HI tasclix, it depends what you mean by an OS X boot drive.
    If you want a recovery disk from which you can reinstall (by re-downloading) or recover from a time machine backup, then nbar is correct.
    If, however, you want to boot and run the OS X installer from the USB drive (so that you don't need to download again), then you will need a copy of "Install OS X  Mavericks.app"; see this article:
    http://support.apple.com/kb/HT5856
    Before downloading again, search your system to see if the installer is still there - it's usually in the /Applications folder unless it has been deleted, but check your whole system for it anyway, you never know, you might still have it somewhere.
    Message was edited by: SilverSkyRat

  • How to use an binary stream file to generate Arb from Agilent 33250A?

    I used Lv6.1 and ag33xxx.llb (download from NI web page). And I want to generate Arb waveform from Agilent33250A, this Arb according to an binary stream file, just like 0101110010100011.......
    I used "Getting Started 2.vi" module, to try first, and all setting used default value. Instrument can be remote controlled. But what I can see from oscilloscope is very strange. The waveform is start with several sine wave (at very high voltage even to 40Vpp!!) and then several sine wave (at low voltage), then at about 0v. It is not what I want!
    And, if I changed Frequecy or 0/1 data, NOTHING changed of output waveform.
    On Agilent web site, I found there are some vi examples for Agilent33250A. But I can NOT read it for all vi modules in ag33250a.llb. I'm puzzled about where can I find this file ag33250a.llb.
    I'm not sure what's the problem with "Getting Started 2.vi" module, or anything incorrect of my setting. And I want to know how can I do for my project right now?
    I appreciate the help.

    Thanks, Werner.
    I used Agilent54622D scope to check Agilent33250A output directly via coaxial-cable.
    Firstly, that's my mistake to not change scope setting "Probe scale" to 0.5:1, (default is 10:1).
    Then I opened LV ag33xxx.llb (download on NI web site) --> ag33xxx - Getting Started.vi.  Select "waveform shape" is Sine,  Freq is 1KHz, Amplitude is 1Vpp. Run this vi, I can get correct sine wave from scope. Then select some other waveform, such as square and triangle, all are correct.
    After above, I opened "ag33xxx - Getting Started 2.vi", it is used for Arb function. Run this vi directly, output waveform is in attachment. If I changed Freq, nothing changed of waveform.
    So, I'm puzzled about it. Where the issue is?
    You can use Arb mode successfully. How to do it?
    Regards,
    Yue
    Attachments:
    Arb_op.doc ‏26 KB

  • I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.

    I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week, Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.
    The file name has no special character in it, just letters and no spaces.
    I have done this in the past and it has worked, but now it will not.
    I have not upgraded any software, that I am aware of.
    After scanning, the Image Capture pops up the Scan Results with the file name in the window, but neither the Scan Results nor the Image Capture window responds to inputs.  The Image Capture window is frozen, with only the "Overview" and "Cancel" buttons active (but non-responsive).
    Is this a software issue or a scanner hardware issue?  I am using a HP Photosmart C6200 series printer/scanner on a network using a Time Capsule airport.
    Thanks.

    I had the same problem.
    Got a 90% fix.  Apparently the Mavericks preferences won't work with Yosemite, so I just deleted the Image Capture preferences.
    Unfortunately, the "Scan to" folder seems to be permanently set to the Pictures folder.
    1.  Quit Image Capture
    2.  Go to Finder > Go > Home, which opens up your home folder (named after your user name)
    3.  Open Library > Preferences > com.apple.ImageCapture.plist - Drag this file to the Trash
    4.  Start "Image Capture", click "Details" and change all your settings as you prefer
    5.  Quit and restart "Image Capture".   Notice it remembers all your settings except "Scan to" folder.  It insists on saving to "Pictures".
    That's as far as I was successful.  I tried changing the "Scan to" folder to "Desktop", but on launch, Image Capture always sets it back to "Pictures".
    This is what I tried:
    6.  Download and install "Pref Setter" from http://www.nightproductions.net/prefsetter.html
    7.  Quit "Image Capture".  Right-click on "com.apple.ImageCapture.plist" and open with Pref Setter.
    8.  Search for "Pictures", which finds "~/Pictures" (the tilde character at the start means your home directory).
    9.  Double-click on "~/Pictures" and change it to the folder you prefer.  I like "~/Desktop"
    10. Choose File > Save then Quit from Pref Setter.  Note that re-opening the plist file still shows "~/Desktop"
    11. Start up "Image Capture" -- on startup, "Image Capture" sets "Scan to" folder to "Pictures"
    I consider this a bug.

Maybe you are looking for