tab
This commit is contained in:
1 parent
ddc02ffa15
commit
3bd43e4de1
1 file changed
+4
-8
@@ -4,7 +4,6 @@ import java.awt.image.BufferedImage;
|
||||
import boofcv.io.image.UtilImageIO;
|
||||
import boofcv.io.image.ConvertBufferedImage;
|
||||
import boofcv.struct.image.GrayU8;
|
||||
import boofcv.struct.border.BorderType;
|
||||
import boofcv.struct.image.Planar;
|
||||
|
||||
public class ImageProcessing {
|
||||
@@ -127,7 +126,6 @@ public class ImageProcessing {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Passe un pixel de l'espace de couleurs RGB à l'espace de couleurs HSV :
|
||||
@@ -249,7 +247,7 @@ public class ImageProcessing {
|
||||
for (int x = 0; x < input.width; x++) {
|
||||
if (y < half || x < half || y >= input.height - half || x >= input.width - half) {
|
||||
int gl = inputGray.getBand(0).get(x, y);
|
||||
int[] rgb = {gl,gl,gl};
|
||||
int[] rgb = { gl, gl, gl };
|
||||
setRGBValue(output, x, y, rgb);
|
||||
continue;
|
||||
}
|
||||
@@ -271,15 +269,12 @@ public class ImageProcessing {
|
||||
value = 0;
|
||||
if (value > 255)
|
||||
value = 255;
|
||||
int[] rgb = {value, value, value};
|
||||
int[] rgb = { value, value, value };
|
||||
setRGBValue(output, x, y, rgb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Applique un filtre moyenneur de taille indiquée à l'image
|
||||
* passée en paramètre (le bord de l'image n'est pas modifié)
|
||||
@@ -389,6 +384,7 @@ public class ImageProcessing {
|
||||
// save output image
|
||||
final String outputPath = args[1];
|
||||
UtilImageIO.saveImage(input, outputPath);
|
||||
System.out.println("Image saved in: " + outputPath); }
|
||||
System.out.println("Image saved in: " + outputPath);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user