LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

imwrite

hi

 

i am not able to execute imwrite command in the mathscript module in LabVIEW. Is there any way i can execute the imwrite command ?\

 

Vishnu.T

0 Kudos
Message 1 of 6
(6,589 Views)

Hi,

 

What command did you execute? Did MathScript throw any errors?

0 Kudos
Message 2 of 6
(6,583 Views)

ttrr wrote:

What command did you execute?


imwrite

0 Kudos
Message 3 of 6
(6,576 Views)

Hello vishnu_t,

 

I believe fwrite_image is what you're looking for, refer to this help document:

 

LabVIEW Help: fwrite_image (MathScript RT Module Function)

http://zone.ni.com/reference/en-XX/help/373123C-01/lvtextmath/msfunc_fwrite_image/

 

When you say this is not able to execute, is the function recognized?  Do you see any errors?  Does the VI run at all?  What version of LabVIEW are you using, and on what platform (Windows, RT, etc)?

 

Regards,

Tom L.
0 Kudos
Message 4 of 6
(6,571 Views)

I am using labview 2013 in windows 7.

 

i tried to execute imwrite(array,name); where array is the 2d array i want to write as the image and name is the full path of the image i.e eg: 'D:\pic.jpg'.

 

I get the error "You specified an invalid number of input parameters for this function."

 

What can I do

 

Vishnu.T

0 Kudos
Message 5 of 6
(6,559 Views)

Hi,

 

The third input which speicifies file type is required. Then, you have to give three inputs as follows.

 

a = rand(10);
imwrite(a, 'D:\test.png', 'png')

 

Message 6 of 6
(6,556 Views)