Overall Problem – I want to do fast image modification in Android, and my current naive solution is too slow I’m building an Android app that will involve fast modification of streaming images. I am running it on a Samsung Galaxy S10. I’m new to Android, Java, and Kotlin, so please forgive any ignorance on my part. I’ve successfully decoded
Tag: image-processing
How do I create an Image from a byte array?
I want to be able to take the data of an image as an array, modify it, and then use that array to create a modified image. Here is what I attempted: Here is how it works. The robot takes a screen capture of the screen, which is then stored into a BufferedImage. The data of the image is stored
Can’t create an image file in Java
What I need to do is I have a input image file and I need to change it as user’s parameters. For example if user wants to make it %30 darker, first I get all pixels with their RGB values and store them in an 2D array. Sample array given below. After that I overwrite that RGB values (in our
How to check if contours are the same?
I’ve got two images, the second one is the first one after modification. I find contours of two images and then check if there any same contours. The problem is, that despite contours being the same (drawing contours of one image and another one gives totally same results) after checking that it never becomes true that one contour is equal
Getting Mats from frames in a gif using OpenCV and Java
I am trying to get frames from a gif using OpenCV. I found Convert each animated GIF frame to a separate BufferedImage and used the second suggestion. I modified it slightly to return an array of Mats instead of BufferedImages. I tried two methods to get bufferedImages from the gif. Each presented different problems. With the previous thread’s suggestion The
Solving native open cv code error in androd.mk for developing panorama on android
I am trying to develop an android application for generating panoramic images usig feature of image stitching in Open CV. I have used the code give on the site given below. http://ramsrigoutham.com/2012/12/21/panorama-app-on-android-using-stitching-module-opencv/ There is an error shown in the log cat shown below. Please guide me how to solve the error. This is the screenshot of the native.cpp file where
PNGj: Row writing order
The purpose is to draw a small image inside another image at some specified area. Is there any possibility to change only specified rows and avoid rewriting of entire lines of the origin image? I …
IllegalArgumentException: Numbers of source Raster bands and source color space components do not match For a color image Exception
The above answer that someone has suggest, converts my colored image to a black and white one. So it’s not appropriate for my question. here is the code and below is the image. Download the image and save in your pc. And try to run the above code with a correct value of path, it will throw an exception in
ImageMagick: How to compare original PNG to lossy JPEG?
I want to compare original PNG image to lossy JPEG image to see how much I am loosing. I found that I can use ImageMagic to compare images. I prefer using Java (im4java). I am very confused with their documentation (http://www.imagemagick.org/script/compare.php). It doesn’t describe which platform it is for. How do I use these command lines and are they even
How to scale a BufferedImage
Following the javadocs, I have tried to scale a BufferedImage without success here is my code: I can’t understand why it is not working, any help? Answer AffineTransformOp offers the additional flexibility of choosing the interpolation type. The fragment shown illustrates resampling, not cropping; this related answer addresses the issue; some related examples are examined here.