public class ImageUtil extends Object
| 构造器和说明 |
|---|
ImageUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static BufferedImage |
binaryImage(BufferedImage image) |
static BufferedImage |
denoise(BufferedImage image)
降噪,以1个像素点为单位(实际使用中可以循环降噪,或者把单位可以扩大为多个像素点)
|
static double |
getGray(double[][] zuobiao,
int x,
int y,
int w,
int h)
// 自己加周围8个灰度值再除以9,算出其相对灰度值
|
static BufferedImage |
grayImage(BufferedImage bufferedImage) |
static boolean |
isBlack(int colorInt) |
static int |
isBlack(int colorInt,
int whiteThreshold) |
static boolean |
isWhite(int colorInt) |
public static BufferedImage grayImage(BufferedImage bufferedImage) throws Exception
Exceptionpublic static BufferedImage binaryImage(BufferedImage image) throws Exception
Exceptionpublic static double getGray(double[][] zuobiao,
int x,
int y,
int w,
int h)
zuobiao - x - y - w - h - public static BufferedImage denoise(BufferedImage image)
image - public static boolean isBlack(int colorInt)
public static boolean isWhite(int colorInt)
public static int isBlack(int colorInt,
int whiteThreshold)
Copyright © 2023. All Rights Reserved.