To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to save and load grayscale (SGL) images to binary files.
Description
Occasionally, cameras may output Grayscale images with the data type of single (SGL). The IMAQ Writefile function does not have a method for saving single type images, however, we can save these images to a simple binary file with resolution data for proper image reconstruction. The write function included in this example transforms the IMAQ image to a 2-D of pixel data. This data, along with the image resolution is written to a binary file. The Read function first reads the image resolution data, then reads the rest of the pixel data in the file. The function then uses the image resolution to rebuild the image to its original form and returns the imaq image.
This example also contains a test VI that shows how to call read and write functions.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
Test VI Block Diagram:
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
"we can save these images to a simple binary file with resolution data for proper image reconstruction" This is helpful. And I wonder what degree of "proper image reconstruction" stands for?
Do you have C program about save,pleaase email 1255694986@qq.com