Questions tagged [cimg]

The CImg Library is a small, open source, C++ toolkit for image processing.

The CImg Library is a small, open source, C++ toolkit for image processing.

CImg stands for Cool Image: It is easy to use, efficient and is intended to be a very pleasant toolbox to design image processing algorithms in C++. Due to its generic conception, it can cover a wide range of image processing applications.

297 questions
0
votes
1 answer

Access pixel values without loading image in memory for large images

I need to compute the mean value of an image using CImg library like this: int i = 0; float mean = 0; CImg img("image.cimg"); float *ptr = img.data(); //retrieves pointer to the first value while(i
Anthony
  • 443
  • 1
  • 5
  • 16
0
votes
1 answer

Place image at certain position of bigger image

I have an image loaded from a file like this: string FILE_IN = "file.cimg; CImg image_small; CImg image_big; image.load_cimg(file_in); And I want to copy-paste the exact image in image_small to image_big, but specifying the position…
Anthony
  • 443
  • 1
  • 5
  • 16
0
votes
1 answer

C++ pass by reference returning junk or in wrong variable

I'm pulling pixel data from an image using the CImg library and placing it in an array in a struct: int JpgHandle::loadJpg(const char* Name, SImageData & data){ CImg src(Name); int width = src.width(); int height =…
omnipotato
  • 31
  • 1
  • 7
0
votes
1 answer

In opecv, how to implement get_gradientXY of CImg

I am currently working on implementing the function of CImg, which is get_gradientXY, using the interface of OpenCV. And I found that cvSobel in OpenCV may have the same effect of get_gradientXY, but after experimenting on a sample graph, the output…
0
votes
3 answers

Overlaying images with CImg

It seems like this would be very easy, but I am having a lot of problems using the draw_image() function in CImg. Here is a snippet of code: CImg landingScreen("desertSunset.bmp"), newGameBTN("newgame.pgm"); CImgDisplay…
0
votes
0 answers

How to use fftw3 on Qt?

Im making an aplication for image filtering and Im sucesfully using the CImg.h library to help with the task, but as you might know the fft isn't for any image and I need to activate the use of the fftw3 library to overcome this. And I dont have any…
0
votes
0 answers

Importing and looping through a PNG image to check for transparency

I would like to write CPP code that is able to take in a PNG file, scan through its pixels and identify where the transparent pixels are. I tried doing this with CIMG, but it didn't work out as CIMG only supports the RGB channels. Even after…
kop_padawan
  • 57
  • 1
  • 7
0
votes
1 answer

CImg FFT return values

I'm a bit confused about the return values of CImg's get_FFT() Function. The fourier transform should give me a real and imaginary part. get_FFT() returns a CImgList with two images - which one is the real and which is the imaginary part? It seems…
mish
  • 1,055
  • 10
  • 29
0
votes
2 answers

spectral residual saliency detection in C++ with CImg

I'm trying to implement the spectral residual approach for saliency detection, described in this paper: http://www.klab.caltech.edu/~xhou/papers/cvpr07.pdf There is a reference implementation in Matlab Code, taken from their…
mish
  • 1,055
  • 10
  • 29
0
votes
1 answer

Concurrently initializing many arrays with random numbers using Curand and CUDA kernel

I am trying to initialize 100 elements of each these parallel arrays with randomly generated numbers concurrently on the GPU. However, my routine is not producing a variety of random numbers. When I debug the code in Visual Studio I see one number…
Shayan Zafar
  • 113
  • 1
  • 13
0
votes
1 answer

Macro log2 used without args error with cimg?

So I got myself g++ for windows following this. Since I wanted to experiment with CImg I downloaded the beta from here. I simply copied the cimg.h into g++'s include directory and also put some dependencies it couldn't find when compiling…
Wingblade
  • 9,585
  • 10
  • 35
  • 48
0
votes
1 answer

Run CImg library with node-gyp error

I want to use CImg library to deal images in node.js,so i write an node addon to do it. The compile is success, i run node-gyp build commond, that's ok. But when i run the node program,the follow error occurs: [root@localhost hcaptha]# node index.js…
WuZhonghua
  • 331
  • 1
  • 2
  • 9
0
votes
1 answer

cimg display rendering black

Using CImg; I'll keep this quick and simple. CImg i = *spectralImages->at(currentImage); disp.display(i); float* f = i.data(); disp is displaying a black image despite the fact that stepping through *(f), *(f+1), *(f+2), etc. is retrieving…
ThatSnail
  • 67
  • 2
  • 12
0
votes
1 answer

CImg library not loading image

I have followed the CImg tutorial and I it works perfectly. However, if I try to load a different image (other than lena.jpg), I get a stack overflow error. For example, this works: CImg image; string filePath =…
TallClimate
  • 3
  • 1
  • 4
0
votes
1 answer

error LNK2019: unresolved external symbol "extern "C" what is this error?

i was trying to wrap cimg library inside c++/clr and when i try to build it i get a bunch of Link errors. Error 20 error LNK2028: unresolved token (0A0002AC) "extern "C" int __stdcall DestroyWindow(struct HWND__ *)"…
Serak Shiferaw
  • 993
  • 2
  • 11
  • 32