Thread Subject: imwrite gives black image when screen locked

Subject: imwrite gives black image when screen locked

From: Cammy Peterson

Date: 24 Nov, 2009 15:55:21

Message: 1 of 5

I am running a rather long program and saving off intermediate image results so that I can do some post-analysis. This works fine when I am sitting at my computer, but if I run the script overnight or if the computer gets locked up while running then all my images come out black. I am saving the images as bmp. Is this the way imwrite is expected to work? If so are there any work arounds? Thanks!

ckp

Subject: imwrite gives black image when screen locked

From: ImageAnalyst

Date: 24 Nov, 2009 17:46:28

Message: 2 of 5

On Nov 24, 10:55 am, "Cammy Peterson"
<cammy.peter...@hotmail.com.remove> wrote:
> I am running a rather long program and saving off intermediate image results so that I can do some post-analysis.  This works fine when I am sitting at my computer, but if I run the script overnight or if the computer gets locked up while running then all my images come out black.  I am saving the images as bmp.  Is this the way imwrite is expected to work?  If so are there any work arounds?  Thanks!
>
> ckp

---------------------------------------------------------
Just a thought...is your screen saver kicking in and your save routine
saves a screenshot? What about the power saving / Energy Star options
on the computer, and possibly the monitor (though I doubt it)?

Subject: imwrite gives black image when screen locked

From: Cammy Peterson

Date: 24 Nov, 2009 18:30:40

Message: 3 of 5

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <ef512b32-adf3-490e-84a3-8c8a33177a7a@t18g2000vbj.googlegroups.com>...
> On Nov 24, 10:55?am, "Cammy Peterson"
> <cammy.peter...@hotmail.com.remove> wrote:
> > I am running a rather long program and saving off intermediate image results so that I can do some post-analysis. ?This works fine when I am sitting at my computer, but if I run the script overnight or if the computer gets locked up while running then all my images come out black. ?I am saving the images as bmp. ?Is this the way imwrite is expected to work? ?If so are there any work arounds? ?Thanks!
> >
> > ckp
>
> ---------------------------------------------------------
> Just a thought...is your screen saver kicking in and your save routine
> saves a screenshot? What about the power saving / Energy Star options
> on the computer, and possibly the monitor (though I doubt it)?

That is very possible. My screen saver is black. Is that the way imwrite is suppose to work -- taking a capture of what is being displayed rather than saving off the actual image? If so, is there a way to save an image without having to display it, because I do need to run this application overnight. Forgive my ignorance, I am very new to this.

Subject: imwrite gives black image when screen locked

From: ImageAnalyst

Date: 24 Nov, 2009 18:54:17

Message: 4 of 5

I'm not sure - it's a black art, or at least it seems so to me and
lots of others. That's why Oliver Woodford's utilities, such as SC
and export_fig, are so popular - they do what you want and expect.
Look him up on the file exchange (http://www.mathworks.com/
matlabcentral/fileexchange/authors/29192). (No he's not me by the
way!)

Try turning your screensaver off. Then, are you trying to save an
image with graphics overlays (text annotation, lines, blob outlines,
etc.) and the whole figure window, or are you just trying to save an
array? If you're just saving an array, I wouldn't think imwrite would
care what's happening on the screen, but if you're using one of the
dizzying array of ways to save figures (hgsave, saveas, print, etc.)
then it might depend on what's on screen - that's where Oliver's
utilities really shine.

Subject: imwrite gives black image when screen locked

From: Cammy Peterson

Date: 24 Nov, 2009 19:19:21

Message: 5 of 5

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <a2448d59-81fa-4d89-8a62-8d1883ac364d@p33g2000vbn.googlegroups.com>...
> I'm not sure - it's a black art, or at least it seems so to me and
> lots of others. That's why Oliver Woodford's utilities, such as SC
> and export_fig, are so popular - they do what you want and expect.
> Look him up on the file exchange (http://www.mathworks.com/
> matlabcentral/fileexchange/authors/29192). (No he's not me by the
> way!)
>
> Try turning your screensaver off. Then, are you trying to save an
> image with graphics overlays (text annotation, lines, blob outlines,
> etc.) and the whole figure window, or are you just trying to save an
> array? If you're just saving an array, I wouldn't think imwrite would
> care what's happening on the screen, but if you're using one of the
> dizzying array of ways to save figures (hgsave, saveas, print, etc.)
> then it might depend on what's on screen - that's where Oliver's
> utilities really shine.

Thanks for the tip! I really appreciate it. I have downloaded a couple of his classes and am trying it out right now.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com