Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

fread_image (MathScript RT Module Function)

LabVIEW 2011 MathScript RT Module Help

Edition Date: June 2011

Part Number: 373123B-01

»View Product Info

Owning Class: support

Requires: MathScript RT Module

Syntax

a = fread_image(fname, ftype)

Legacy Name: imread

Description

Reads image data from a file. The image size cannot exceed 4 megapixels.

Details

Examples

Inputs

Name Description
fname Specifies the filename. fname is a string.
ftype Specifies the file type. ftype is a string that accepts the following values.

'BMP' BMP image
'JPEG' JPEG image
'PNG' PNG image

Outputs

Name Description
a Returns the data LabVIEW reads from the file you specify in fname. a is a matrix of 64-bit, double-precision, floating-point numbers.

Details

If you use this function in a stand-alone application or shared library and fname is a relative path, LabVIEW searches for the file in the path where you installed the application or shared library. If fname is an absolute path, LabVIEW searches for the file on the local machine or target at the specified location. (Real-Time Module) If you deploy this function to an RT target and fname is a relative path, LabVIEW searches for the file in the path returned by the Default Data Directory VI.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT No (affects entire script)

Examples

z = peakfcn2d(30);
fwrite_image(z, '/images/reference/en-XX/help/373123B-01/imagetest.bmp', 'BMP');
z1 = fread_image('/images/reference/en-XX/help/373123B-01/imagetest.bmp', 'BMP');
surface(z1)

Related Topics

fwrite_image
peakfcn2d
surface


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit