cimg

FFT of an image

Hi. I have an assignment about fftw and I was trying to write a small program to create an fft of an image. I am using CImg to read and write images. But all I get is a dark image with a single white dot :( I'm most likely doing this the wrong way and I would appreciate if someone could explain how this should be done. I don't need the ...

Multiplying and adding images with CImg In C++

Hello I am trying to find C in the following function in CImg C=B*L+(1-B)S Where C, L and S are all RGB images of the same size (and B is a single channel grayscale matte) I cannot figure out how to loop over the pixels. I've seen code like: cimg_forXYZ(S,x,y,z) {... } But I have never see than kind of syntax before, could it be ...

Single channelled images in CImg

hi all, I use CImg for my image processing work. I work only on Gray Scale JPG, BMP, TIFF images presently. the problem i am facing with CImg function is as follows: CImg stores the Pixel values in the following way. R1R2R3R4............G1G2G3G4.........B1B2B3B4......... Even for grey scale images, 3 different channels are created sep...

Segmentation fault when different input is given

hi all, I do some image processing work in C++. For this i use CImg.h library which i feel is good for my work. Here is small piece of code written by me which just reads an image and displays it. #include "../CImg.h" #include "iostream" using namespace std; using namespace cimg_library; int main(int argc,char**argv) { CImg<uns...

Selecting an area from displayed image using CImg library

hi all, i use CImg for my image processing work. I had written a small piece of code which is follows: #include "../CImg.h" #include <iostream> using namespace std; using namespace cimg_library; int main(int argc,char**argv) { CImg<int> img(argv[1]); CImgDisplay disp; disp.assign(img); while(!disp.is_closed) disp.wait(); ret...

is there a way to change the text's font in Cimg?

hi!i wanted to know if i can draw a text in Cimg graphic library draw_text function and change the font of the text to another font ? ...

Inserting an image with Cimg Graphics library

Hi!can anybody explain how to insert a JPEG image with the CImg Graphics library in VC++? ...

SVD Singular Value Decomposition in CImg library

Hey there! the CImg library offers SVD calculation. however, i'm always getting a * glibc detected * ./projective_template: free(): invalid next size (fast): 0x089165b8 * error. I couldn't find proper documentation on the function. my matrix is 8 by 9 and that's the code: CImg<float> A(8,9); ....filling the matrix.... CImg<float> U...

CImg compile problems in Codegear 2009

I wish to use the CImg library for image processing in my current project. I am using Codegear C++ Builder 2009. I include CImg.h in the source file and put in the following code: int rows =5; int cols = 5; CImg<double> img(rows,cols); I get the following error: [BCC32 Error] CImg.h(39159): E2285 Could not find a match for 'CImg<uns...

Write TIFF float images using CImg

Hi! I'm using CImg and I have noticed that I cant write TIFF images with float data. CImg wrotes them as 1byte/per pixel integer images. ¿Does anyone know if it is possible to write float images? Or, do you know other lib to do it. ...

Why can CImg achieve this kind of effect?

The compilation is done on the fly : only CImg functionalities really used by your program are compiled and appear in the compiled executable program. This leads to very compact code, without any unused stuffs. Any one knows the principle? ...

How to get rgb value by cimg?

CImg<unsigned char> src("image.jpg"); int width = src.width(); int height = src.height(); unsigned char* ptr = src.data(10,10); How can I get rgb from ptr? ...

How to correct RGB color taken with camera ?

Hi everyone, I had this question in my mind lately: I have taken a photo of a picture in my computer's display using my phone's camera (2MP) then transferred the picture to my computer. What i have noticed is that the individual pixel (RGB) values of the photographed image are different from the original picture (which is obvious !) but...

CImg Python 3 bindings or something at least comparable?

Hi there, i'm searching a Python lib with good image processing functionalities . I was searching for CImg (which i've already used on C++ projects) bindings, but i wasn't lucky. I found PIL, but it lacks a lot of features that CImg has so, is there any good alternative ? Thanks UPDATE PIL is good, but i need Python 3 support on a Mac...

Loading PNGs with CImg

I am unable to load PNGs with CImg. I've heard you need to get libpng / zlib to get to work first but I am unsure how to set this up. I am on Ubuntu. My source: #include <cmath> #include <cstdio> #include <string> #include <assert.h> #include <stdarg.h> #define cimg_using_png #include "CImg.h" using namespace cimg_library; #include "pn...