To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to extract the three color planes (red, green, blue) from an image and save the planes as CVS file.
Description
It is sometimes desired to process an image in another application like Excel. To do so, you need to convert the image from png/jpg/bmp and so on into a format which can be easily processed by Excel. The CSV file format is one format which can be used for this purpose.
This example demonstrates how to use the functions shipped with the Vision Development Module (VDM) to extract a red, green and blue color plane from an image and how to save the planes as CSV file.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
Once the CSV file is opened in Excel, you can determine where the Green plane's 2D array begins by counting the number of columns. The number of columns will be equal to the width of the image.
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.