1

Hi I am working with a matrix of 448*448 elements of real(signed) data and wanted to display it as grayscale image in C as i did in MATLAB using imagesc. Can anyone tell me which is the fastest and easiest library or code to display the grayscale image from the matrix in C?

Thanks.

Tugrul Ates
  • 9,451
  • 2
  • 33
  • 59
snabbasi
  • 129
  • 3
  • 12

4 Answers4

1

Also look at openCV libs. These libs are quite good. It has both c and C++ interface.

shobhonk
  • 621
  • 5
  • 15
0

As shobhonk suggested, take a look at OpenCV, a computer vision and image processing library that works with C and C++. To accomplish something similar to imagesc in C++, I use the functions imread and imshow or alternatively I load the data in a Mat structure and I display it with imshow.

Jaime Ivan Cervantes
  • 3,579
  • 1
  • 40
  • 38
0

ImageMagick has a native C API if you want to avoid OpenCV: MagickWand. If you want better low-level capabilities you can try MagickCore. The ConstituteImage function supplied with MagickCore sounds like it would do what you like.

-1

Have a look at CImg. Although not C but C++, that should be able to do what you want. Unless of course C++ is a big nono for you. Whether or not it is fastest or easiest is not something I dare to claim. You'll have to figure that out yourself.

Bart
  • 19,692
  • 7
  • 68
  • 77