File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,25 @@ There are two versions of the script, a JupyterNotebook and a normal Python
2222script. For both of them, in the main function, the variables ` img_name ` and
2323` img_ext ` must be updated. The ` img_name ` is only the name of the image that
2424is saved in ` tools/datagen/src/imgs ` and the ` img_ext ` is the extension of the
25- image. For instance:
25+ image. The ` salt_probability ` is used to set the probability of getting a salt
26+ pixel in the image, while ` pepper_probability ` is used for the pepper pixels.
27+ These two variables can be set to 0.0 to generate an image without noise. For
28+ instance:
2629
2730``` python
31+ salt_probability: float = 0.1
32+ salt_probability: float = 0.1
2833img_name: str = ' car'
2934img_ext: str = ' jpg
3035```
3136
3237will load ` tools/datagen/src/imgs/car.jpg ` image and generate:
3338
3439* tools/datagen/src/imgs/car\_ grayscale\_ image.jpg
35- * tools/datagen/src/imgs/car\_ sobel \_ combined \_ result .jpg
40+ * tools/datagen/src/imgs/car\_ noisy \_ image .jpg
3641* tools/datagen/src/imgs/car\_ sobel\_ x\_ result.jpg
3742* tools/datagen/src/imgs/car\_ sobel\_ y\_ result.jpg
43+ * tools/datagen/src/imgs/car\_ sobel\_ combined\_ result.jpg
3844
3945These generated images are ignored and must not be committed to the repository.
4046
You can’t perform that action at this time.
0 commit comments