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
1
vote
2 answers

glReadPixels - image looks dithered

I wish to capture an image I rendered rendered in openGL. I use glReadPixels and then save the image with CImg. Unfortunately, the result is wrong. See below. The image on the left is correct. I captured it with GadWin PrintScreen. The image on the…
ahoffer
  • 6,347
  • 4
  • 39
  • 68
1
vote
0 answers

How to get FFT values from Cimg FFT?

I am using Cimg to get FFT values of a (256 X 256)image. But FFT values for images are 3-dimesnional arrays of complex values i.e (256 X 256 X 3). i got two images using get_FFT() the real and imaginary part of the image. i also printed the values…
SVJ
  • 51
  • 5
1
vote
0 answers

Why does my image get cropped in half when applied Sobel Edge Detector?

Let me start by saying I am very newbie at C++ and so I don't really know the best practices or handle very well with the syntax. I'm trying to read a black and white image, and using the sobel algorithm to detect its edges and output the result,…
Phil
  • 175
  • 8
1
vote
0 answers

How to plot multi curves within one plot with CImg?

Here is my code to plot single order of bessel function with CImg: #include "libs/CImg-master/CImg.h" #include #include #include #include using namespace cimg_library; using…
1
vote
0 answers

Failed to recognize format of file 'Lenna.jpg'. terminate called after throwing an instance of 'cimg_library::CImgIOException'

i get this message when i run this output of Cimg program #include "CImg.h" using namespace cimg_library; int main(int argc, char * argv[]) { const char * input_file = "Lenna.jpg"; CImg * input = new CImg
SVJ
  • 51
  • 5
1
vote
1 answer

Append image in CIMG and save in stb_image_write not working

I am using stb_image stb_image_write and CImg with following code int width, height, bpp; img = stbi_load(imgPath, &width, &height, &bpp, 3); CImg cimg(img, width, height, 1, bpp); CImg wimg(width, 10,…
1
vote
1 answer

CImg failed to recognize format of file "bmp"

I installed CImg to load the image (Visual Studio 2019). I wanted to get my picture, but no matter how I indicate the path to the picture, CImg does not see it. My code: #include "neural_network.h" #include "CImg/CImg.h" #include…
1
vote
0 answers

CImg doesn't recognize png/jpeg macOS

I'm new using, CImg I already installed CImg using brew install cimg, and then I installed XQuartz. When I'm trying to run this program in the terminal I get this error: Code: #include #include "CImg.h" using namespace…
1
vote
1 answer

CImg library when compiling return undefined reference to `__imp_SetDIBitsToDevice'

I'm using VSCode on Windows 10 with MinGW compiler installed. I've tried using CImg library to edit images (http://cimg.eu/), and when I'm trying to compile code from tutorial (http://cimg.eu/reference/group__cimg__tutorial.html) I get this…
1
vote
1 answer

Loading a point cloud in CImg

I am trying to create a 3D CImg object from a point cloud to use the editing capabilities of CImg. I have a point cloud that I save in ascii format pcl::io::savePCDFileASCII("/path/data.txt", *cloud); Then i initialize a 3d CImg object and try to…
1
vote
1 answer

CImg Reading Image

I am working on a University Project that is to make a game like Bejewled. We are using OpenGL and CImg. The Project file has the following function in it: void ReadImage(string imgname, vector &imgArray) { using namespace…
1
vote
1 answer

How to get the bit depth of a CImg pixel?

I'm trying to work out how many colour possibilities are used per pixel for any given image. For example, if an image uses 8 bits per pixel, then it can represent one of 256 shades. I'm looking for something like the following: CImg
SuperHanz98
  • 2,090
  • 2
  • 16
  • 33
1
vote
1 answer

How To Convert an XY-RGB dataframe into a Image [cimg type]

Using imager library, I have a dataframe that has the following information about the image in the columns: X column: x coordinate of pixel Y column: y coordinate of pixel Rvalue: Red component of pixel Gvalue: Green component of pixel Bvalue: Blue…
kareem_emad
  • 1,123
  • 1
  • 7
  • 12
1
vote
1 answer

How to remove pepper noise using median filter algorithm

I have written a code (in c++) to add noise in the image using CImg library. Now i want to load the image with noise and remove those noise inside the image using median filter algorithm. Below is my code. int main() { int x; cout<<"Welcome…
cany
  • 39
  • 7
1
vote
1 answer

Creating a background with RGB value 73,95,105

Trying to create a background with the above RGB values,however the only success i had till now is by loading jpegs.Is there a way to create the background programmatically? #include "CImg.h" using namespace cimg_library; constexpr int Height =…