The CLI accepts several command-line arguments that control the behavior of the image processing application.
Below is a list of available command-line arguments and their descriptions.
- Syntax:
-in <inputPath>
- Description: Specifies the path to a file or directory where the images to be processed are located.
- Syntax:
-out <outputPath>
- Description: Specifies the path to a file or directory where the processed images will be saved.
- Syntax:
-agent=<agentType>
-
Description: Allows you to specify the agent strategy to be used during image processing. You can choose from the following options:
Full, which uses a single agent for opening, processing and saving
Partial, which uses different agents for each transformation and saving
PartialUsingComposition, which uses one agent for transformation and one for saving
No, which uses naive image processing function
- Syntax:
-unit=<unitType>
-
Description: Specifies the processing unit to be used for image processing. You can choose from the following options:
CPU
NvidiaGPU
IntelGPU
AmdGPU
AnyGPU
- Syntax:
<transformation1> <transformation2> ...
-
Description: Provides a list of available transformations to be applied during image processing. You can choose from the following options:
Gauss
Sharpen
Lighten
Darken
Edges
RotationR
RotationL
FlipV
FlipH
Before usage, go to specify directory:
cd /path/to/ImageProcessing/src/ImageProcessing
|
To process images from one directory and save them to another, you can use the following commands.
- Оne transformation applied to each image in the directory
dotnet run -in /input/path -out /output/path -agent=full -unit=cpu gauss
|
- List of transformations that are sequentially applied
dotnet run -in /input/path -out /output/path -agent=no -unit=anygpu gauss sharpen
|
Before usage, go to specify directory:
cd /path/to/ImageProcessing/src/ImageProcessing
|
-
Process images using the CPU with Gauss filter:
dotnet run -in "input_directory" -out "output_directory" -unit=cpu gauss
|
-
Process images using an Nvidia GPU with full agent support and rotations:
dotnet run -in "input_directory" -out "output_directory" -unit=NvidiaGPU -agent=Full -rotationl -rotationr
|