F
F
Fotonick2016-05-10 10:57:29
Java
Fotonick, 2016-05-10 10:57:29

How to analyze pixels in an image?

I want to make an application that will analyze images. The simplest case is when a horizontal image is inscribed in a square, so that large areas of white or black are obtained above and below the image. That is, for example, I want to analyze if the pixels on the 20th line from the top and the 20th line from the bottom of the image all have the same color, then such an image is probably horizontal and can be deleted or moved to another folder.
Please tell me which way to dig to do this? What kind of ready-made libraries exist for this?
PS How are images analyzed for blurring, poor sharpness, low resolution? Also by the color information of the pixels? What good software do you know that can separate high-quality and bad photos?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Airat1995, 2016-05-10
@Airat1995

Well, you need to look for something on computer vision, you can search resources here . There are ready-made libraries for implementation, the most common one is this one .

X
X-, 2016-05-10
NoNAME @XNoNAME

самый простой способ:

private boolean isHorisontal(BufferedImage img) {
        for(int x=0;x<img.getWidth();x++){
            if(img.getRGB(x, 20)!=img.getRGB(x, img.getHeight()-20)) return false;
        }
        return true;
    }

но тут картинки должны быть без размытостей

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question