vips

Ruby VIPS image.write_to_memory yields different results in different environments

做~自己de王妃 提交于 2019-12-13 20:17:10
问题 We need to open an image and write its pixels to memory, so a C library can further process it. We're doing this with the lines below: image = Vips::Image.new_from_file(filename) pixels_pointer = image.write_to_memory However, it seems that what's written in memory differs per environment. We're testing this on a macOS High Sierra and on an Ubuntu Xenial via Docker, with vips-8.8.0 and ruby-vips (2.0.13) . We've MD5-ed the result of writing to memory: p Digest::MD5.hexdigest(pixels_pointer)

How can I use VIPS for image normalization?

筅森魡賤 提交于 2019-12-11 03:59:18
问题 I want to normalize the exposure and color palettes of a set of images. For context, this is for training a neural net in image classification on medical images. I'm also doing this for hundreds of thousands of images, so efficiency is very important. So far I've been using VIPS, specifically PyVIPS, and would prefer a solution using that library. After finding this answer and looking through the documentation, I tried x = pyvips.Image.new_from_file('test.ndpi') x = x.hist_norm() x.write_to

Ruby-vips image processing library. Are there any good examples of usage?

限于喜欢 提交于 2019-12-07 06:36:41
问题 I am completely new to image processing. I know nothing about what is JPEG internally and how it works. I wonder, if I can find somewhere piece of ruby code performing following simple operation: Open jpeg file. Iterate through each pixel and set it's color to fx green. Write result to another file. I am especially interested in how this can be accomplished using ruby-vips library https://github.com/ender672/ruby-vips My goal - to learn how to perform basic image processing operations using

How to perform logical operation and logical indexing using VIPS in Python?

别来无恙 提交于 2019-12-06 12:43:20
问题 I've had following codes that use Python and OpenCV. Briefly, I have a stack of image taken at different focal depth. The codes pick out pixels at every (x,y) position that has the largest Laplacian of Guassian response among all focal depth(z), thus creating a focus-stacked image. Function get_fmap creates a 2d array where each pixel will contains the number of the focal plane having the largest log response. In the following codes, lines that are commented out are my current VIPS

Ruby-vips image processing library. Are there any good examples of usage?

我怕爱的太早我们不能终老 提交于 2019-12-05 08:47:44
I am completely new to image processing. I know nothing about what is JPEG internally and how it works. I wonder, if I can find somewhere piece of ruby code performing following simple operation: Open jpeg file. Iterate through each pixel and set it's color to fx green. Write result to another file. I am especially interested in how this can be accomplished using ruby-vips library https://github.com/ender672/ruby-vips My goal - to learn how to perform basic image processing operations using ruby-vips (gamma correction, brightness, tint, ...) Any links to working examples more complex than