Questions tagged [boost-gil]

The Boost Generic Image Library (Boost.GIL) is a C++ library that abstracts image representations from algorithms and allows writing code that can work on a variety of images with performance similar to hand-writing for a specific image type.

The Boost Generic Image Library (Boost.GIL) is a C++ library that abstracts image representations from algorithms and allows writing code that can work on a variety of images with performance similar to hand-writing for a specific image type.

69 questions
1
vote
1 answer

Convert GIL image_view directly to OpenCV Mat

I am getting a stream of images from a simulator in the form of a gil::image_view and need to convert them to cv::Mat for further processing. Up until now I more or less copied the code from this answer without really understanding it: auto…
M47
  • 400
  • 2
  • 13
1
vote
0 answers

Boost GIL write_view throws LNK2019 errors

I want to learn how to load, write, ... *.png images with Boost GIL. (My programming environment is VS 2019) The problem is that GIL has problems with saving/loading files. It throws many LNK2019 errors. My Code is: boost::gil::rgb8_image_t…
RD4
  • 135
  • 1
  • 12
1
vote
1 answer

How to flip image vertically using Boost::GIL

I'm trying to generate an image icon. Based on some restrictions, I need to get a one-dimensional array of int32_t pixel values ​​in order {r, g, b, a, r1, g1, b1, a1, ...}. In this case, the order of the rows should be the same as with OpenGL UV…
ivpe
  • 47
  • 5
1
vote
1 answer

How to read image info from python bytes string using Boost::GIL?

I write a function to read image width and height from file header int read_image_dimensions() { namespace bg = boost::gil; std::string filepath = "image.png"; std::ifstream byte_stream(filepath, std::ios::binary); int width = 0,…
ivpe
  • 47
  • 5
1
vote
0 answers

Errors when trying to read image using Boost gil

I'm trying to follow the boost gil tutorial - the official documentation here But I stumbled upon some weird errors while trying to read the image, don't really know what those mean. Any ideas guys? My code: #include #include…
Alex_M1612
  • 33
  • 2
1
vote
1 answer

Does boost::gil support 10 bit images?

I'm trying to read 10 bit images from a buffer and analyze them with boost::gil. I noticed that there exists an rgb8_image_t type, a gray8_image_t type, but can't find a gray10_image_t type (which is what I need). Does this exist in gil?…
Julia
  • 11
  • 4
1
vote
1 answer

boost::gil::resize_view seg fault when creating iterator over view

I am having some problems related to using boost::gil library when I try to resize an image view. I would like to access the pixels content of a image view after resizing it. However, I always obtain a segmentation fault when doing this. Here is my…
Jasthro
  • 11
  • 1
1
vote
1 answer

Using boost::gil::color_converted_view with boost::gil::for_each_pixel

I realized that writing to gil::color_converted_view doesn't affect the underlying view's data. I wonder if that's correct? For example, let's say that I want to write a program that will take the value of the red channel and set the blue channel's…
kizzx2
  • 18,775
  • 14
  • 76
  • 83
1
vote
2 answers

Positioning an image within an image using GIL from Boost in C++

I am trying to figure out how to position an image within newly created image in C++ using GIL from Boost library. #define png_infopp_NULL (png_infopp)NULL #define int_p_NULL (int*)NULL #include #include…
AESTHETICS
  • 989
  • 2
  • 14
  • 32
1
vote
0 answers

Boost (1.57) GIL gives a compilation error "Non-type template argument evaluates to -1" in channel_algorithm.hpp

We are using Boost 1.57 in our project. We are now interested in using GIL to write image files. To #include in a translation unit raises the following error with Clang [Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM…
Ad N
  • 7,930
  • 6
  • 36
  • 80
1
vote
1 answer

How can I avoid this warning with boost:gil:png_write_view on x64

The following code issues a warning: boost::gil::rgb8_image_t img(10, 10); boost::gil::png_write_view("TenByTen.png", view(img)); when compiled with VS 2010 under 64 bit. It says: \boost\gil\extension\io\png_io_private.hpp(341): warning C4244:…
Anon
  • 10,660
  • 1
  • 29
  • 31
1
vote
1 answer

BOOST::Gil for image processing

s it possible to: read an image given by just a filename (not knowing the image format) to a 2d matrix rgb uncompressed form (e.g. read an JPG to a 2d array) access the bytes of that image, copy them, change them... (e.g. inverse the colors, I need…
user3275596
  • 31
  • 1
  • 6
1
vote
2 answers

C# Design guidance for generic image processing library

In any image processing library there is always the issue of having to provide an implementation of every single algorithm for every single image format (color space, channels, bit depth, mem layout, etc). One very elegant solution to the problem is…
Charles
  • 53
  • 4
1
vote
1 answer

jpeg_write_view error in boost::gil

I am now learning how to use generic image library in boost, and the following codes illustrate how to write some raw data to a jpeg file: int main(void) { unsigned char *src_pixels; int src_row_bytes = 200; src_pixels = new unsigned…
feelfree
  • 11,175
  • 20
  • 96
  • 167
1
vote
0 answers

Reading a PNG image with Boost + libpng

I am trying to write a simple program that would read in a grayscale PNG image using Boost's GIL Image I/O library and then obtain each pixel's information. I have downloaded and extracted the libpng and zlib, included them in my makefile, and…
TMGunter
  • 137
  • 1
  • 4
  • 12