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
3
votes
2 answers

OpenGL texture color separation

I'm using CImg within an OpenGL environment. When I try to add a texture, each color seems to separate out into separate tile within the texture. For example, when I attempt to use a texture that looks like this: it comes out in my program…
Vicker
  • 33
  • 4
3
votes
1 answer

which filter is being use by get_convolve() function in CImg library

Which kind of filter is being used by CImg library's get_convolve() function(written in C)? Median or Gaussian or bilateral or some other? I tried to understand the function so that I can use the similar functionality in PIL openCV. In the header…
Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
3
votes
1 answer

CImg not displaying transparent png images correctly?

I am using CImg combined with libpng in Visual Studio 2010 to display png images. When I display the image using CImg, it appears to not correctly display the transparency. I am not sue if this is me not fully grasping the concepts of CImg, a…
TVOHM
  • 2,740
  • 1
  • 19
  • 29
3
votes
1 answer

Image processing - How to Apply Box Filter Smoothing

EDIT: My description of a box filter is very wrong (all weights should be the same in a box filter), but the answer provided does fix the problem in the picture. Namely the error of not making sure the sum of the weights was equal to 1. I'm taking a…
Tim
  • 301
  • 1
  • 5
  • 8
2
votes
1 answer

How to display few images (each in separate window) with CImg ?

How can one display several images - each in one window - with the use of CImg ? When I try something like this cimg_library::CImg image(s.c_str()); cimg_library::CImgDisplay main_disp(image, s.c_str() ); …
Patryk
  • 22,602
  • 44
  • 128
  • 244
2
votes
3 answers

OpenGL with GLUT-- malloc errors

I want to screen scrape the image from a GLUT window that has been rendered in OpenGL. In side of the display callback I inserted this code: display() { drawTriangle(); //Renders the image if(shouldDisplay) { …
ahoffer
  • 6,347
  • 4
  • 39
  • 68
2
votes
1 answer

CImg: How to save a grayscale?

When I use CImg to load a .BMP, how can I know whether it is a gray-scale or color image? I have tried as follows, but failed: cimg_library::CImg img("lena_gray.bmp"); const int spectrum =…
Ming Lu
  • 21
  • 1
  • 5
2
votes
1 answer

Cannot Open .png file with CImg on CLion (macOS)

I've tried including libpng16/png.h and #define cimg_use_png, but none of them solved the error. Also, I have main.cpp, lenna.jpg and CImg.h in the same directory. CMakeLists.txt: cmake_minimum_required(VERSION…
Gabriel S
  • 351
  • 3
  • 11
2
votes
1 answer

How to use CImg functions with pixel data?

I am using Visual Studio and looking to find a useful image processing library that will take care of basic image processing functions such as rotation so that I don't have to keep coding them manually. I came across CImg and it supports this, as…
Rich95
  • 199
  • 1
  • 3
  • 18
2
votes
1 answer

C++ Xcode 9 - failed to call function display() from Cimg

I'm writing c++ program using Cimg in Xcode 9.0 MacOS 10.14 Following is my code #include "CImg.h" using namespace cimg_library; int main(){ CImg img("1.bmp"); auto w = img._width; auto h = img._height; printf("%d…
Yunquan Gu
  • 21
  • 1
2
votes
2 answers

How to get pixel data as a matrix/vector in CImg?

I need to read a greyscale png image, so that the pixel values(0-255) are stored in a 2D matrix of unsigned chars. Currently I am using CImg in C++, which succesfully reads the image but I couldn't figure it out how to get the pixel data out of the…
Gold007
  • 23
  • 1
  • 4
2
votes
1 answer

CImg error : Failed to recognize format of file "xxx.png"

I've been looking for a code in C++ which gets me the RGB values of all pixels of a png file. So I searched a lot through the internet and found different ways of doing such a thing, like using libpng , OpenCV, Magick++, CImg , etc. and I just…
mitrafrz
  • 51
  • 6
2
votes
1 answer

Using CImg to fill in color using linear interpolation

"Using CImg, write a program that constructs a square image and assigns a color to each corner. Using linear interpolation, fill in and color each pixel in the square so that there is a smooth coloring across the entire area of the square" I have a…
William
  • 53
  • 10
2
votes
1 answer

CImg with jpeglib

I'm trying to make CImg work with Visual Sudio 2017 and jpeg-9b but for some reason it doesn't. Code: #define cimg_use_jpeg #include "../CImg/CImg.h" using namespace cimg_library; #pragma comment(lib, "libjpeg.a") CImg
Klyse
  • 59
  • 2
  • 11
2
votes
1 answer

Having issues using CImg to colormap a grey-scale Image

I am using CImg for a few different things in a project and have a grey-scale image that I need to apply a jet_LUT256 color map to. I am not sure if I am on the right path or not. Any guidance would be appreciated. #include "CImg.h" using namespace…
Logan Fawcett
  • 41
  • 2
  • 8
1 2
3
19 20