LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot save image with IMAQ Write File 2

Solved!
Go to solution

Hi,

 

I have made a vi to average image from multiple similar images. But, it cannot write the average image file at the end of the program saying "File access denied". I have tried everything possible (even changing the browse option to file/folder for the every sub-vi inside "IMAQ Write File 2". I am on LabVIEW 2015.

 

Hudson.

Download All
0 Kudos
Message 1 of 8
(4,152 Views)

So, just to ask the simple question first...

Are you sure that the location you're trying to save to - the path given by Path for Average Image - is valid to save an image file to?

If you're saving to somewhere that requires specific permissions, it might be you don't have access rights.

 

As a separate consideration, you're averaging based on the number of files found in the directory, but only adding a specific number of files. Is this intentional? (You also might be ignoring the first file found...)


GCentral
0 Kudos
Message 2 of 8
(4,139 Views)

- the path doesn't have any permission issue (access is NOT read-only)

- adding a specific number of files is intentional

FYI, I can save the image manually from the output image on the front panel (check the attached pic). But, automating with the code will save some pain.

0 Kudos
Message 3 of 8
(4,126 Views)

I don't see any path/filename for the file you want to save, and / by itself cannot be a file name, no?

 

BTW, is this a cRIO vision system? and you want to measure the cone angle of the jet?

CY (expired CLAD)
0 Kudos
Message 4 of 8
(4,118 Views)

Well, even if I browse and add a path, it doesn't work. It's for conducting some spray analysis.

0 Kudos
Message 5 of 8
(4,113 Views)
Solution
Accepted by topic author hudsonhornet

did you browse and add path during execution or before execution? after you added a path, did you append (build) the filename to the path

CY (expired CLAD)
Message 6 of 8
(4,109 Views)

Ah! Finally, typing in the filename after showing the folder did it. Anyway, when I save as *.JPG the image is totally dark/blank. Any idea about that? I cannot save the image other than as a *.PNG. I am happy that it's doable now. Thanks 🙂 

0 Kudos
Message 7 of 8
(4,103 Views)

happy for you that you got it running... reason on why it was black most likely is due to the absence of the color palette.

 

you can get this when you first read the file, assuming they are all the same palette from the same source.

CY (expired CLAD)
0 Kudos
Message 8 of 8
(4,099 Views)