April 10th, 2013, 01:34 AM
How to convert a 2D matrix into a 2D map intensity graph (color one)
I am now having a 2d matrix a[i][j], which has a size of 1024�256. the row number stands the x-axis infomration, the column number stands for the y-axis information and the value a[i][j] stands for the intensity of the graph. For example, a=100, means at point where x=32, y=100, the intensity is 100 counts.
What I would like to do is that I want to plot a 2D map with different color stands for differnt intensity based on the the matrix a[i][j]. for example a=0, then at that point(8,9) the color is black. if a=maximum intensity, then at point (10,10) there are red. This is kind of intensity graph in labview.
I haven't done this before, because normally I just load the 2d matrix into labview or Origin to plot that. However recently I change the lab, and those license are not available anymore. I need to use Visual C++ express 2010 to finish this.
My personal insight to do this is to have a picture with a pixel size of 1024�256. The color of each pixel (i,j) is based on the value a[i][j]. Am I right about this?
Does anybody have done this before? Can I use OpenGl to do this? Any help will be much appreciated!
If u answer my question, I will surely give reputation to you untill i have no reputation! But i will try to get more reputation, and give it to you lately!
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!