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

How do take a screenshot correctly with xlib?

I am trying to capture an image of the screen for use in screencasting. Thus I need a fast solution, and cannot rely on shell programs such as import or xwd. This is the code I have written so far, but it fails and gives me a junk image, which just…
user406009
10
votes
2 answers

Runtime error on Windows when trying to load image with libpng

I am using pHash and that library uses libpng. I am having issues running my program because libpng fails loading a PNG file. Version of libpng: 1.4.19 Platform: Windows 10 Environment: Visual Studio 2015 Trivial Just if you came up with the…
Andry
  • 16,172
  • 27
  • 138
  • 246
9
votes
4 answers

Need a good algorithm to categorize 8GB of pictures

I have about 150.000 pictures and some of these are duplicates. I have figured that the SSIM algorithm is a good choice to compare two pictures and see if they are duplicates. However if I want to find duplicates that way, I will have to compare…
moccajoghurt
  • 131
  • 6
8
votes
2 answers

Can't save image to file properly with cimg library

Here is the entirety of my code: #include "CImg.h" #include using namespace cimg_library; int main() { CImg image(100,100,1,3,0); const float color[] =…
Tneuktippa
  • 1,645
  • 3
  • 15
  • 25
7
votes
4 answers

How to get rgb value by cimg?

CImg 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?
user198729
  • 61,774
  • 108
  • 250
  • 348
5
votes
2 answers

fastest image processing library?

I'm working on robot vision system and its main purpose is to detect objects, i want to choose one of these libraries (CImg , OpenCV) and I have knowledge about both of them. The robot I'm using has Linux , 1GHz CPU and 1G ram and I'm using C++ the…
ajlajlajl
  • 177
  • 1
  • 14
5
votes
3 answers

can the CImg library draw thick lines

I have been using the CImg library, and have been pleased with how easy it is to integrate and use. However, I now want to draw thick lines (i.e., more than one pixel thick). It is not clear from the API documentation of the draw_line function…
M Katz
  • 5,098
  • 3
  • 44
  • 66
5
votes
1 answer

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 #include #include #include #include…
worbel
  • 6,509
  • 13
  • 53
  • 63
5
votes
2 answers

Convert an image loaded using PIL to a Cimg image object

I am trying to convert a iamge loaded using PIL to a Cimg image object. I understand that Cimg is a c++ library and PIL is a python imaging library. Given an image url, my aim is to calculate the pHash of an image without writing it onto a disk.…
Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
4
votes
2 answers

cimg library - linking error

I try to use the cimg library. I have included the CImg.h-header file. But when I try to compile it, I get a linking error. /tmp/cc2tvYsW.o: In function `cimg_library::cimg::Mutex_info::trylock(unsigned…
ArchLinuxTux
  • 840
  • 1
  • 11
  • 28
4
votes
3 answers

CImg: Failed to recognize the jpg format

#include #include #include "CImg.h" using namespace cimg_library; using namespace std; int main(){ CImg image("lena.jpg"), visu(500,400,1,3,0); const unsigned char red[] = { 255,0,0 }, green[] = { 0,255,0 },…
PSlayer
  • 61
  • 1
  • 2
  • 11
4
votes
2 answers

Create video from array of pixel values in C++

Does anyone know of a method to save a sequence of pixel values, stored in an array to a video? Currently I'm using Cimg to visualise a simple n-body simulation, whilst I can save each iteration to an image file, this is very slow. Any suggestions…
Angus
  • 101
  • 2
  • 5
4
votes
4 answers

Eigen and CImg compatibility issues

So, I'm trying to record and display an image using CImg but I'm also using a linear algebra library called Eigen. Coincidentally, they each seem to have a macro with the same name, "Success". I've tried doing an #undef but that didn't work out…
4
votes
3 answers

CImg Error : 'gm.exe' is not recognized as an internal or external command,

I am new to c++ programming , today i was trying to save an image using CImg . CImg is C++ Template Image Processing Library . The basic code i wrote is(Please forgive any syntax erros , as copied part of my codes) : #include "CImg.h"// Include CImg…
web2dev
  • 557
  • 10
  • 28
4
votes
2 answers

Executing member function on each comma-separated object

Here is the relevant code from the full listing: #include "CImg.h" using namespace cimg_library; int main() { CImg src("Tulips.jpg"); int width = src.width(); int height = src.height(); int depth = src.depth(); //New…
Junk Mvg
  • 157
  • 2
  • 7
1
2 3
19 20