From 51f4f264c036c5c4b3b09f230cb5cec91079c322 Mon Sep 17 00:00:00 2001 From: PolinaSavelyeva Date: Sat, 16 Sep 2023 01:44:51 +0300 Subject: [PATCH] Fix link in docs --- docs/How_Tos/Making_A_Code.html | 2 +- docs/index.json | 2 +- docsSrc/How_Tos/Making_A_Code.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/How_Tos/Making_A_Code.html b/docs/How_Tos/Making_A_Code.html index 740ea46..8b9e4a4 100644 --- a/docs/How_Tos/Making_A_Code.html +++ b/docs/How_Tos/Making_A_Code.html @@ -332,7 +332,7 @@

Proce
  • PartialUsingComposition, which uses one agent for transformation and one for saving
  • No, which uses naive image processing function
  • -

    And define a list of transformations to apply to the image, and specify the processing unit (CPU or GPU) for the operation.

    +

    And define a list of transformations to apply to the image, and specify the processing unit (CPU or GPU) for the operation.

    Simple Directory Processing Example

    Open library and define directories:

    open ImageProcessing.Process
    diff --git a/docs/index.json b/docs/index.json
    index 245f3c6..c51be7e 100644
    --- a/docs/index.json
    +++ b/docs/index.json
    @@ -1 +1 @@
    -[{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing.html","title":"ImageProcessing","content":"Agents \nArguCommands \nCLI \nCPU \nGPU \nHelper \nKernels \nMyImage \nProcess"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html","title":"Agents","content":"Agents \n \nAgents.imageMessage \nimageMessage \nAgents.pathMessage \npathMessage \nAgents.logger \nlogger \nAgents.imageSaver \nimageSaver \nAgents.imageProcessor \nimageProcessor \nAgents.imageFullProcessor \nimageFullProcessor"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#logger","title":"Agents.logger","content":"Agents.logger \nlogger \n\n Represents a logger, which receives messages and prints them\n to the console\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#imageSaver","title":"Agents.imageSaver","content":"Agents.imageSaver \nimageSaver \n\n Defines an image saver agent that listens to image-messages and\n saves them to a specified output directory\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#imageProcessor","title":"Agents.imageProcessor","content":"Agents.imageProcessor \nimageProcessor \n\n Defines an image processing agent that listens to image-messages and\n applies the given function\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#imageFullProcessor","title":"Agents.imageFullProcessor","content":"Agents.imageFullProcessor \nimageFullProcessor \n\n Creates an image processing and saving MailboxProcessor that continuously receives path messages from\n an input mailbox. It loads, edits, and saves images to the specified output directory\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-imagemessage.html","title":"imageMessage","content":"imageMessage \n\n Represents a message type that can either contain an image or\n an end-of-stream signal, which is used with an asynchronous reply\n channel\n  \nimageMessage.Image \nImage \nimageMessage.EOS \nEOS"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-imagemessage.html#Image","title":"imageMessage.Image","content":"imageMessage.Image \nImage \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-imagemessage.html#EOS","title":"imageMessage.EOS","content":"imageMessage.EOS \nEOS \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-pathmessage.html","title":"pathMessage","content":"pathMessage \n\n Represents a message type encapsulated either a string path\n or an end-of-stream message, which is used with an asynchronous\n reply channel\n  \npathMessage.Path \nPath \npathMessage.EOS \nEOS"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-pathmessage.html#Path","title":"pathMessage.Path","content":"pathMessage.Path \nPath \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-pathmessage.html#EOS","title":"pathMessage.EOS","content":"pathMessage.EOS \nEOS \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands.html","title":"ArguCommands","content":"ArguCommands \n \nArguCommands.ArguProcessingUnits \nArguProcessingUnits \nArguCommands.CLIArguments \nCLIArguments \nArguCommands.arguProcessingUnitsParser \narguProcessingUnitsParser"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands.html#arguProcessingUnitsParser","title":"ArguCommands.arguProcessingUnitsParser","content":"ArguCommands.arguProcessingUnitsParser \narguProcessingUnitsParser \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html","title":"ArguProcessingUnits","content":"ArguProcessingUnits \n\n Represents the available CPU/GPU platforms for image processing\n  \nArguProcessingUnits.CPU \nCPU \nArguProcessingUnits.NvidiaGPU \nNvidiaGPU \nArguProcessingUnits.IntelGPU \nIntelGPU \nArguProcessingUnits.AmdGPU \nAmdGPU \nArguProcessingUnits.AnyGPU \nAnyGPU"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#CPU","title":"ArguProcessingUnits.CPU","content":"ArguProcessingUnits.CPU \nCPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#NvidiaGPU","title":"ArguProcessingUnits.NvidiaGPU","content":"ArguProcessingUnits.NvidiaGPU \nNvidiaGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#IntelGPU","title":"ArguProcessingUnits.IntelGPU","content":"ArguProcessingUnits.IntelGPU \nIntelGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#AmdGPU","title":"ArguProcessingUnits.AmdGPU","content":"ArguProcessingUnits.AmdGPU \nAmdGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#AnyGPU","title":"ArguProcessingUnits.AnyGPU","content":"ArguProcessingUnits.AnyGPU \nAnyGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html","title":"CLIArguments","content":"CLIArguments \n \nCLIArguments.InputPath \nInputPath \nCLIArguments.OutputPath \nOutputPath \nCLIArguments.AgentsSupport \nAgentsSupport \nCLIArguments.ProcessingUnit \nProcessingUnit \nCLIArguments.Transformations \nTransformations"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#InputPath","title":"CLIArguments.InputPath","content":"CLIArguments.InputPath \nInputPath \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#OutputPath","title":"CLIArguments.OutputPath","content":"CLIArguments.OutputPath \nOutputPath \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#AgentsSupport","title":"CLIArguments.AgentsSupport","content":"CLIArguments.AgentsSupport \nAgentsSupport \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#ProcessingUnit","title":"CLIArguments.ProcessingUnit","content":"CLIArguments.ProcessingUnit \nProcessingUnit \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#Transformations","title":"CLIArguments.Transformations","content":"CLIArguments.Transformations \nTransformations \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cli.html","title":"CLI","content":"CLI \n \nCLI.main \nmain"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cli.html#main","title":"CLI.main","content":"CLI.main \nmain \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html","title":"CPU","content":"CPU \n \nCPU.applyFilter \napplyFilter \nCPU.rotate \nrotate \nCPU.flip \nflip"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html#applyFilter","title":"CPU.applyFilter","content":"CPU.applyFilter \napplyFilter \n\n Applies a filter to an input image\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html#rotate","title":"CPU.rotate","content":"CPU.rotate \nrotate \n\n Rotates an input image either clockwise or counterclockwise\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html#flip","title":"CPU.flip","content":"CPU.flip \nflip \n\n Flips an input image either vertically or horizontally\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html","title":"GPU","content":"GPU \n \nGPU.applyFilterGPUKernel \napplyFilterGPUKernel \nGPU.rotateGPUKernel \nrotateGPUKernel \nGPU.flipGPUKernel \nflipGPUKernel \nGPU.applyFilter \napplyFilter \nGPU.rotate \nrotate \nGPU.flip \nflip"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#applyFilterGPUKernel","title":"GPU.applyFilterGPUKernel","content":"GPU.applyFilterGPUKernel \napplyFilterGPUKernel \n\n Creates compiled GPU filter kernel\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#rotateGPUKernel","title":"GPU.rotateGPUKernel","content":"GPU.rotateGPUKernel \nrotateGPUKernel \n\n Creates compiled GPU rotation kernel\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#flipGPUKernel","title":"GPU.flipGPUKernel","content":"GPU.flipGPUKernel \nflipGPUKernel \n\n Creates compiled GPU flip kernel\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#applyFilter","title":"GPU.applyFilter","content":"GPU.applyFilter \napplyFilter \n\n Applies a filter to the specified image using GPU\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#rotate","title":"GPU.rotate","content":"GPU.rotate \nrotate \n\n Rotates the image clockwise or counterclockwise using GPU\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#flip","title":"GPU.flip","content":"GPU.flip \nflip \n\n Flips the image vertically or horizontally using GPU\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-helper.html","title":"Helper","content":"Helper \n \nHelper.toFlatArray \ntoFlatArray \nHelper.generatePath \ngeneratePath"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-helper.html#toFlatArray","title":"Helper.toFlatArray","content":"Helper.toFlatArray \ntoFlatArray \n\n Converts a 2D array to a flat 1D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-helper.html#generatePath","title":"Helper.generatePath","content":"Helper.generatePath \ngeneratePath \n\n Generates a file path by combining an output directory and an image name\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html","title":"Kernels","content":"Kernels \n \nKernels.gaussianBlurKernel \ngaussianBlurKernel \nKernels.edgesKernel \nedgesKernel \nKernels.darkenKernel \ndarkenKernel \nKernels.lightenKernel \nlightenKernel \nKernels.sharpenKernel \nsharpenKernel"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#gaussianBlurKernel","title":"Kernels.gaussianBlurKernel","content":"Kernels.gaussianBlurKernel \ngaussianBlurKernel \n\n Represents a Gaussian blur kernel for filter applying on CPU  as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#edgesKernel","title":"Kernels.edgesKernel","content":"Kernels.edgesKernel \nedgesKernel \n\n Represents a edges kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#darkenKernel","title":"Kernels.darkenKernel","content":"Kernels.darkenKernel \ndarkenKernel \n\n Represents a darken kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#lightenKernel","title":"Kernels.lightenKernel","content":"Kernels.lightenKernel \nlightenKernel \n\n Represents a lighten kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#sharpenKernel","title":"Kernels.sharpenKernel","content":"Kernels.sharpenKernel \nsharpenKernel \n\n Represents a sharpen kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage.html","title":"MyImage","content":"MyImage \n \nMyImage.MyImage \nMyImage \nMyImage.load \nload \nMyImage.save \nsave"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage.html#load","title":"MyImage.load","content":"MyImage.load \nload \n\n Loads the image located at the specified file path\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage.html#save","title":"MyImage.save","content":"MyImage.save \nsave \n\n Saves the image to the specified directory in the same extension as the input\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html","title":"MyImage","content":"MyImage \n\n Encapsulates an image, which includes both the byte pixel data and its associated attributes.\n  \nMyImage.\u0060\u0060.ctor\u0060\u0060 \n\u0060\u0060.ctor\u0060\u0060 \nMyImage.Data \nData \nMyImage.Width \nWidth \nMyImage.Height \nHeight \nMyImage.Name \nName"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#\u0060\u0060.ctor\u0060\u0060","title":"MyImage.\u0060\u0060.ctor\u0060\u0060","content":"MyImage.\u0060\u0060.ctor\u0060\u0060 \n\u0060\u0060.ctor\u0060\u0060 \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Data","title":"MyImage.Data","content":"MyImage.Data \nData \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Width","title":"MyImage.Width","content":"MyImage.Width \nWidth \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Height","title":"MyImage.Height","content":"MyImage.Height \nHeight \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Name","title":"MyImage.Name","content":"MyImage.Name \nName \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html","title":"Process","content":"Process \n \nProcess.AgentsSupport \nAgentsSupport \nProcess.ProcessingUnits \nProcessingUnits \nProcess.Transformations \nTransformations \nProcess.transformationsParserCPU \ntransformationsParserCPU \nProcess.transformationsParserGPU \ntransformationsParserGPU \nProcess.processImages \nprocessImages"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html#transformationsParserCPU","title":"Process.transformationsParserCPU","content":"Process.transformationsParserCPU \ntransformationsParserCPU \n\n Parses an image transformation and returns the corresponding CPU-based transformation function\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html#transformationsParserGPU","title":"Process.transformationsParserGPU","content":"Process.transformationsParserGPU \ntransformationsParserGPU \n\n Generates GPU kernel functions for applying various image transformations\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html#processImages","title":"Process.processImages","content":"Process.processImages \nprocessImages \n\n Processes images located at the specified input path and saves the processed images to the specified output path\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html","title":"AgentsSupport","content":"AgentsSupport \n\n Specifies the level of agents support\n  \nAgentsSupport.Full \nFull \nAgentsSupport.Partial \nPartial \nAgentsSupport.PartialUsingComposition \nPartialUsingComposition \nAgentsSupport.No \nNo"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#Full","title":"AgentsSupport.Full","content":"AgentsSupport.Full \nFull \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#Partial","title":"AgentsSupport.Partial","content":"AgentsSupport.Partial \nPartial \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#PartialUsingComposition","title":"AgentsSupport.PartialUsingComposition","content":"AgentsSupport.PartialUsingComposition \nPartialUsingComposition \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#No","title":"AgentsSupport.No","content":"AgentsSupport.No \nNo \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html","title":"ProcessingUnits","content":"ProcessingUnits \n\n Represents processing device\n  \nProcessingUnits.CPU \nCPU \nProcessingUnits.GPU \nGPU"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html#CPU","title":"ProcessingUnits.CPU","content":"ProcessingUnits.CPU \nCPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html#GPU","title":"ProcessingUnits.GPU","content":"ProcessingUnits.GPU \nGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html","title":"Transformations","content":"Transformations \n\n Represents the available image transformations\n  \nTransformations.Gauss \nGauss \nTransformations.Sharpen \nSharpen \nTransformations.Lighten \nLighten \nTransformations.Darken \nDarken \nTransformations.Edges \nEdges \nTransformations.RotationR \nRotationR \nTransformations.RotationL \nRotationL \nTransformations.FlipV \nFlipV \nTransformations.FlipH \nFlipH"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Gauss","title":"Transformations.Gauss","content":"Transformations.Gauss \nGauss \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Sharpen","title":"Transformations.Sharpen","content":"Transformations.Sharpen \nSharpen \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Lighten","title":"Transformations.Lighten","content":"Transformations.Lighten \nLighten \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Darken","title":"Transformations.Darken","content":"Transformations.Darken \nDarken \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Edges","title":"Transformations.Edges","content":"Transformations.Edges \nEdges \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#RotationR","title":"Transformations.RotationR","content":"Transformations.RotationR \nRotationR \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#RotationL","title":"Transformations.RotationL","content":"Transformations.RotationL \nRotationL \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#FlipV","title":"Transformations.FlipV","content":"Transformations.FlipV \nFlipV \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#FlipH","title":"Transformations.FlipH","content":"Transformations.FlipH \nFlipH \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/index.html","title":"Introduction to ImageProcessing\n","content":"# Introduction to ImageProcessing\n\n---\n\n## What is ImageProcessing?\n\nImageProcessing is an easy-to-use F# package that utilizes [Brahma.FSharp](https://github.com/YaccConstructor/Brahma.FSharp)\nand [SixLabors.ImageSharph](https://github.com/SixLabors/ImageSharp). It offers two primary image processing options: CPU\nand GPU or agent-supported processing, all accessible within the included console application.\n\n## Why use ImageProcessing?\n\n* Loading images from a local source and saving them.\n* Processing all images within a specified directory.\n* Filtering using one of five kernels, including \u0022Gaussian blur\u0022 and \u0022edges\u0022.\n* Other edits such as 90-degree rotation and flipping.\n* Combinations of existing transformations in four different scenarios.\n* Ability to utilize all of the features solely through the command line.\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/Explanations/Structure.html","title":"Structure","content":"---\ntitle: Structure\ncategory: Explanations\ncategoryindex: 3\nindex: 1\n---\n\n# Structure of ImageProcessing\n\n## Core Concepts\n\n---\n\n### 1. Agents\nThe code uses agents as a fundamental concept for concurrent and asynchronous processing of images. \nAgents are lightweight, concurrent execution units that can receive and process messages independently.\n\n### 2. Image Processing\nImage processing is a key operation performed on images, which involves applying various transformations. \nThese transformations can include filters like Gaussian blur, sharpening, and flip operations (both horizontal and vertical).\n\n### 3. CPU and GPU Processing\nThe code supports image processing on both CPU and GPU platforms. \nCPU processing is done using standard F# functions, while GPU processing utilizes the [Brahma.FSharp](https://github.com/YaccConstructor/Brahma.FSharp) library to leverage the power of Graphics Processing Units for parallel processing.\n\n\n## Diagram\n\n---\n\nThere is a UML diagram representing the dependencies between modules: \n\n![image](https://raw.githubusercontent.com/PolinaSavelyeva/ImageProcessing/main/resources/image_processing_uml.svg)\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/Tutorials/Getting_Started.html","title":"Getting Started","content":"---\ntitle: Getting Started\ncategory: Tutorials\ncategoryindex: 1\nindex: 1\n---\n\n# Getting Started with ImageProcessing\n\n\n## Prepearing\n\n---\n\n### Requirements\n\nFirst of all, make sure the following requirements are installed on your system:\n\n* [dotnet SDK](https://www.microsoft.com/net/download/core) 3.0 or higher (recommended 6.0\u002B),\n* [Mono](http://www.mono-project.com/) if you\u0027re on Linux or macOS or\n* [VSCode Dev Container](https://code.visualstudio.com/docs/remote/containers).\n\nTo find more building and running options take a look at the [MiniScaffold](https://github.com/TheAngryByrd/MiniScaffold) template.\n\n### Package Adding\n\nGo to directory with your \u0060\u0060build.fsproj\u0060\u0060 (or \u0060\u0060build.csproj\u0060\u0060) file and install ImageProcessing using command line:\n\n\u0060\u0060\u0060shell\ndotnet add package ImageProcessing.PolinaSavelyeva --version 1.0.0\n\u0060\u0060\u0060\n\nFor more information visit package main [GitHub page](https://github.com/PolinaSavelyeva/ImageProcessing/pkgs/nuget/ImageProcessing.PolinaSavelyeva).\n\n## Features\n\n---\n\nThe following features are implemented, even for CPU and GPU:\n\n* **Filters**\n    * Gaussian Blur\n    * Edges\n    * Sharpen\n    * Lighten\n    * Darken\n\n\n* **Transformations**\n    * Clockwise rotation\n    * Counterclockwise rotation\n    * Vertical flip (Y-axis)\n    * Horizontal flip (X-axis)\n\n\n* **Multi-threaded processing tools**\n    * Saving agent\n    * Processing agent\n    * Full processing agent, i.e saving plus processing\n    * Events logger\n\n\n* **Directory with pictures processing tool**\n\nFor detailed descriptions of all features above visit [Api Reference](https://polinasavelyeva.github.io/ImageProcessing/reference/index.html).\n\n## Simple Usage\n\n---\n\n### Using CLI\n\nBefore usage, go to specify directory:\n\n\u0060\u0060\u0060sh\ncd /path/to/ImageProcessing/src/ImageProcessing\n\u0060\u0060\u0060\nTo process images from one directory and save them to another, you can use the following commands.\n\n* **\u041Ene transformation applied to each image in the directory**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path -agent=full -unit=cpu gauss\n\u0060\u0060\u0060\n\n* **List of transformations that are sequentially applied**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path  -agent=no -unit=anygpu gauss sharpen\n\u0060\u0060\u0060\n\nYou can find more details about CLI processing [here](https://polinasavelyeva.github.io/ImageProcessing/How_Tos/Using_A_CLI.html).\n\n### Using Your Own Code\n\nOpen library and load image to process:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing\n\nlet myImage = MyImage.load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\u0060\u0060\u0060\n\nCreate new function which sequentially applies blur filter and clockwise rotation to images and saves it on CPU:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E CPU.applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E CPU.rotate true\n    \n    MyImage.save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nCreate the same function for GPU. But before it we need to do some steps for diagnosing graphical device.\n\nDefine the \u0060\u0060device\u0060\u0060 value by specifying the brand of your GPU or whatever the program finds (embedded graphics cards are also suitable). And make OpenCL context of it:\n\n\u0060\u0060\u0060fsharp\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\u0060\u0060\u0060\n\nNext, define new values for filter and rotation functions. This action is necessary because of compiling [kernel function](https://polinasavelyeva.github.io/ImageProcessing/How_Tos/Making_A_Code.html#GPU-processing-kernels) once:\n\n\u0060\u0060\u0060fsharp\nlet applyFilterGPU = GPU.applyFilter clContext 64\nlet rotateGPU = GPU.rotate clContext 64\n\u0060\u0060\u0060\n\nAnd the final function:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    MyImage.save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing\n\nlet myImage = MyImage.load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E CPU.applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E CPU.rotate true\n    \n    MyImage.save rotatedImage pathToSave\n\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\nlet applyFilterGPU = GPU.applyFilter clContext 64\nlet rotateGPU = GPU.rotate clContext 64\n\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    MyImage.save rotatedImage pathToSave\n \nlet pathToSave = \u0022Path/To/Directory/image_name.jpg\u0022\n\napplyCustomFilterOnCPU myImage pathToSave\napplyCustomFilterOnGPU myImage pathToSave\n\u0060\u0060\u0060\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/How_Tos/Making_A_Code.html","title":"How To make a code","content":"---\ntitle: How To make a code\ncategory: How To Guides\ncategoryindex: 2\nindex: 1\n---\n\n# How-To make your own ImageProcessing code\n\n## Implemented Features\n\n---\n\nImageProcessing supports the following features, which you can use when implementing your examples:\n\n* **Filters for CPU/GPU**\n    * Gaussian Blur\n    * Edges\n    * Sharpen\n    * Lighten\n    * Darken\n\n\n* **Transformations for CPU/GPU**\n    * Clockwise rotation\n    * Counterclockwise rotation\n    * Vertical flip (Y-axis)\n    * Horizontal flip (X-axis)\n\n\n* **Multithreaded processing tools**\n    * Saving agent\n    * Processing agent\n    * Full processing agent, i.e saving plus processing\n    * Events logger\n\n\n* **Directory with pictures processing tool**\n\n    Also you can specify:\n  * Processing unit (CPU or GPU)\n  * Agents support\n\nFor detailed descriptions of all features visit [Api Reference](https://polinasavelyeva.github.io/ImageProcessing/reference/index.html).\n\n\n\n## Processing on CPU\n\n---\n\n### CPU filter kernels\n\nFilter kernels are used to call \u0060\u0060applyFilter\u0060\u0060 function. \nYou can create 2D float32 array as new kernel or use implemented [kernels](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html) such as:\n\n* Gaussian Blur\n* Edges\n* Sharpen\n* Lighten\n* Darken\n\n### Multi-threaded processing on CPU\n\nYou can use either single-threaded CPU-based image processing or multi-threaded image processing.\nMultithreading is performed using logger and agent functions, which is specified in this [section](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html).\n\nFour of them are implemented:\n\n* Logger, which is used to inform user about status of operations, i.e work of another agents\n* Saver agent, which is used to save images stored in queue and to send messages to logger\n* Processing agent, which is used to process images stored in queue using specified transformation and to send messages to logger\n* Full processing agent, which does both saving and processing \n\n\n### Simple CPU Example\n\nOpen library and load image to process:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.CPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\u0060\u0060\u0060\n\nCreate new function which sequentially applies blur filter and clockwise rotation to images and saves the result:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotate true\n    \n    save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.CPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotate true\n    \n    save rotatedImage pathToSave\n \nlet pathToSave = \u0022Path/To/Directory/image_name.jpg\u0022\n\napplyCustomFilterOnCPU myImage pathToSave\n\u0060\u0060\u0060\n\n## Processing on GPU\n\n---\n\n### GPU filter kernels\n\nFilter kernels are used to call \u0060\u0060applyFilter\u0060\u0060 function.\nYou can create 2D float32 array as new kernel or use implemented [kernels](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html) such as:\n\n* Gaussian Blur\n* Edges\n* Sharpen\n* Lighten\n* Darken\n\n### GPU processing kernels\n\nGPU kernels are used to call GPU-processing functions.\nThey have specific defining style, so for more information about how they work I recommended to visit [Brahma.Fsharp tutorial](https://yaccconstructor.github.io/Brahma.FSharp/Articles/Custom_Kernels.html).\nBut if you have no need in creating new GPU kernels just use implemented [ones](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html), such as:\n\n* \u0060\u0060applyFilterGPUKernel\u0060\u0060\n* \u0060\u0060rotateGPUKernel\u0060\u0060\n* \u0060\u0060flipGPUKernel\u0060\u0060\n\nAll of them take \u0060\u0060clContext\u0060\u0060 (which is device\u0027s environment abstraction) and \u0060\u0060localWorkSize\u0060\u0060 (which shows the size of local work group) as input parameters.\n\n### Multi-threaded processing on GPU\n\nYou can use either single-threaded GPU-based image processing or multi-threaded image processing.\nMultithreading is performed using logger and agent functions, which specified in this [section](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html).\n\nFour of them are implemented:\n\n* Logger, which is used to inform user about status of operations, i.e work of another agents\n* Saver agent, which is used to save images stored in queue and to send messages to logger\n* Processing agent, which is used to process images stored in queue using specified transformation and to send messages to logger\n* Full processing agent, which does both saving and processing\n\n### Simple GPU Example\n\nOpen library and load image to process:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.GPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\u0060\u0060\u0060\n\nBefore creating our function we need to do some steps for diagnosing graphical device.\n\nDefine the \u0060\u0060device\u0060\u0060 value by specifying the brand of your GPU or whatever the program finds (embedded graphics cards are also suitable). \nAnd make OpenCL context of it:\n\n\u0060\u0060\u0060fsharp\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\u0060\u0060\u0060\n\nNext, define new values for filter and rotation functions. \nThis action is necessary because of compiling [kernel function](https://polinasavelyeva.github.io/ImageProcessing/How_Tos/Making_A_Code.html#GPU-processing-kernels) once:\n\n\u0060\u0060\u0060fsharp\nlet applyFilterGPU = applyFilter clContext 64\nlet rotateGPU = rotate clContext 64\n\u0060\u0060\u0060\n\nCreate new function which sequentially applies blur filter and clockwise rotation to images and saves the result:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.GPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\nlet applyFilterGPU = applyFilter clContext 64\nlet rotateGPU = rotate clContext 64\n\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    save rotatedImage pathToSave\n \nlet pathToSave = \u0022Path/To/Directory/image_name.jpg\u0022\n\napplyCustomFilterOnGPU myImage pathToSave\n\u0060\u0060\u0060\n\n## Processing of Multiple Images via Directories\n\n---\n\n### Process parameters\n\nThe \u0060\u0060processImage\u0060\u0060 function is designed to process directories with various configuration options. \nIt allows you to choose the type of [agent support](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html) for processing:\n\n* \u0060\u0060Full\u0060\u0060, which uses a single agent for opening, processing and saving\n* \u0060\u0060Partial\u0060\u0060, which uses different agents for each transformation and saving\n* \u0060\u0060PartialUsingComposition\u0060\u0060, which uses one agent for transformation and one for saving\n* \u0060\u0060No\u0060\u0060, which uses naive image processing function\n\nAnd define a list of [transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) to apply to the image, and specify the [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/process-processingunits.html) (CPU or GPU) for the operation. \n\n### Simple Directory Processing Example\n\nOpen library and define directories:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.Process\nopen ImageProcessing.AgentSupport\n\nlet inputDirectory = \u0022Full/Path/To/Input/Images/Folder/\u0022\nlet outputDirectory = \u0022Full/Path/To/Output/Images/Folder/\u0022\n\u0060\u0060\u0060\n\nDefine list of [transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) and filters that will be used:\n\n\u0060\u0060\u0060fsharp\nlet imageEditorsList = [Darken; Edges; RotationL]\n\u0060\u0060\u0060\n\nNote that transformations and filters will be applied sequentially, one-by-one on each image in the specific directory. Choose and define [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html#CPU) and [multithreading mode](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html).\n\n\u0060\u0060\u0060fsharp\nlet processingUnit = GPU Brahma.FSharp.Platform.Nvidia\nlet agentsSupport = AgentSupport.Full\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.Process\nopen ImageProcessing.AgentSupport\n\nlet inputDirectory = \u0022Full/Path/To/Input/Images/Folder/\u0022\nlet outputDirectory = \u0022Full/Path/To/Output/Images/Folder/\u0022\n\nlet imageEditorsList = [Darken; Edges; RotationL]\n\nlet processingUnit = GPU Brahma.FSharp.Platform.Nvidia\nlet agentsSupport = AgentSupport.Full\n\nprocessImages inputDirectory outputDirectory processingUnit imageEditorsList agentsSupport\n\u0060\u0060\u0060\n\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/How_Tos/Using_A_CLI.html","title":"How To use CLI","content":"---\ntitle: How To use CLI\ncategory: How To Guides\ncategoryindex: 2\nindex: 2\n---\n\n# How-To use ImageProcessing CLI\n\n## Overview\n\n---\n\nThe CLI accepts several command-line arguments that control the behavior of the image processing application. \nBelow is a list of available command-line arguments and their descriptions.\n\n### InputPath\n\n* **Syntax:** \u0060-in \u003CinputPath\u003E\u0060\n* **Description:** Specifies the path to a file or directory where the images to be processed are located.\n\n### OutputPath\n\n* **Syntax:** \u0060-out \u003CoutputPath\u003E\u0060\n* **Description:** Specifies the path to a file or directory where the processed images will be saved.\n\n### AgentsSupport\n\n* **Syntax:** \u0060-agent=\u003CagentType\u003E\u0060\n* **Description:** Allows you to specify the [agent strategy](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html) to be used during image processing.  You can choose from the following options:\n  * \u0060\u0060Full\u0060\u0060, which uses a single agent for opening, processing and saving\n  * \u0060\u0060Partial\u0060\u0060, which uses different agents for each transformation and saving\n  * \u0060\u0060PartialUsingComposition\u0060\u0060, which uses one agent for transformation and one for saving\n  * \u0060\u0060No\u0060\u0060, which uses naive image processing function\n\n### ProcessingUnit\n\n* **Syntax:** \u0060-unit=\u003CunitType\u003E\u0060\n* **Description:** Specifies the [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html) to be used for image processing. You can choose from the following options:\n  * \u0060\u0060CPU\u0060\u0060\n  * \u0060\u0060NvidiaGPU\u0060\u0060\n  * \u0060\u0060IntelGPU\u0060\u0060\n  * \u0060\u0060AmdGPU\u0060\u0060\n  * \u0060\u0060AnyGPU\u0060\u0060\n\n### Transformations\n\n- **Syntax:** \u0060\u003Ctransformation1\u003E \u003Ctransformation2\u003E ...\u0060\n- **Description:** Provides a list of [available transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) to be applied during image processing. You can choose from the following options:\n  * \u0060\u0060Gauss\u0060\u0060\n  * \u0060\u0060Sharpen\u0060\u0060\n  * \u0060\u0060Lighten\u0060\u0060\n  * \u0060\u0060Darken\u0060\u0060\n  * \u0060\u0060Edges\u0060\u0060\n  * \u0060\u0060RotationR\u0060\u0060\n  * \u0060\u0060RotationL\u0060\u0060\n  * \u0060\u0060FlipV\u0060\u0060\n  * \u0060\u0060FlipH\u0060\u0060\n\n## Usage\n\n---\n\nBefore usage, go to specify directory:\n\n\u0060\u0060\u0060sh\ncd /path/to/ImageProcessing/src/ImageProcessing\n\u0060\u0060\u0060\n\nTo process images from one directory and save them to another, you can use the following commands.\n\n* **\u041Ene transformation applied to each image in the directory**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path -agent=full -unit=cpu gauss\n\u0060\u0060\u0060\n\n* **List of transformations that are sequentially applied**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path  -agent=no -unit=anygpu gauss sharpen\n\u0060\u0060\u0060\n\n## Examples\n\n---\n\nBefore usage, go to specify directory:\n\n\u0060\u0060\u0060sh\ncd /path/to/ImageProcessing/src/ImageProcessing\n\u0060\u0060\u0060\n\n1. Process images using the CPU with Gauss filter:\n   \u0060\u0060\u0060sh\n   dotnet run -in \u0022input_directory\u0022 -out \u0022output_directory\u0022 -unit=cpu gauss\n   \u0060\u0060\u0060\n\n2. Process images using an Nvidia GPU with full agent support and rotations:\n   \u0060\u0060\u0060sh\n   dotnet run -in \u0022input_directory\u0022 -out \u0022output_directory\u0022 -unit=NvidiaGPU -agent=Full -rotationl -rotationr\n   \u0060\u0060\u0060\n   \n"}]
    \ No newline at end of file
    +[{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing.html","title":"ImageProcessing","content":"Agents \nArguCommands \nCLI \nCPU \nGPU \nHelper \nKernels \nMyImage \nProcess"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html","title":"Agents","content":"Agents \n \nAgents.imageMessage \nimageMessage \nAgents.pathMessage \npathMessage \nAgents.logger \nlogger \nAgents.imageSaver \nimageSaver \nAgents.imageProcessor \nimageProcessor \nAgents.imageFullProcessor \nimageFullProcessor"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#logger","title":"Agents.logger","content":"Agents.logger \nlogger \n\n Represents a logger, which receives messages and prints them\n to the console\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#imageSaver","title":"Agents.imageSaver","content":"Agents.imageSaver \nimageSaver \n\n Defines an image saver agent that listens to image-messages and\n saves them to a specified output directory\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#imageProcessor","title":"Agents.imageProcessor","content":"Agents.imageProcessor \nimageProcessor \n\n Defines an image processing agent that listens to image-messages and\n applies the given function\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html#imageFullProcessor","title":"Agents.imageFullProcessor","content":"Agents.imageFullProcessor \nimageFullProcessor \n\n Creates an image processing and saving MailboxProcessor that continuously receives path messages from\n an input mailbox. It loads, edits, and saves images to the specified output directory\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-imagemessage.html","title":"imageMessage","content":"imageMessage \n\n Represents a message type that can either contain an image or\n an end-of-stream signal, which is used with an asynchronous reply\n channel\n  \nimageMessage.Image \nImage \nimageMessage.EOS \nEOS"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-imagemessage.html#Image","title":"imageMessage.Image","content":"imageMessage.Image \nImage \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-imagemessage.html#EOS","title":"imageMessage.EOS","content":"imageMessage.EOS \nEOS \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-pathmessage.html","title":"pathMessage","content":"pathMessage \n\n Represents a message type encapsulated either a string path\n or an end-of-stream message, which is used with an asynchronous\n reply channel\n  \npathMessage.Path \nPath \npathMessage.EOS \nEOS"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-pathmessage.html#Path","title":"pathMessage.Path","content":"pathMessage.Path \nPath \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents-pathmessage.html#EOS","title":"pathMessage.EOS","content":"pathMessage.EOS \nEOS \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands.html","title":"ArguCommands","content":"ArguCommands \n \nArguCommands.ArguProcessingUnits \nArguProcessingUnits \nArguCommands.CLIArguments \nCLIArguments \nArguCommands.arguProcessingUnitsParser \narguProcessingUnitsParser"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands.html#arguProcessingUnitsParser","title":"ArguCommands.arguProcessingUnitsParser","content":"ArguCommands.arguProcessingUnitsParser \narguProcessingUnitsParser \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html","title":"ArguProcessingUnits","content":"ArguProcessingUnits \n\n Represents the available CPU/GPU platforms for image processing\n  \nArguProcessingUnits.CPU \nCPU \nArguProcessingUnits.NvidiaGPU \nNvidiaGPU \nArguProcessingUnits.IntelGPU \nIntelGPU \nArguProcessingUnits.AmdGPU \nAmdGPU \nArguProcessingUnits.AnyGPU \nAnyGPU"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#CPU","title":"ArguProcessingUnits.CPU","content":"ArguProcessingUnits.CPU \nCPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#NvidiaGPU","title":"ArguProcessingUnits.NvidiaGPU","content":"ArguProcessingUnits.NvidiaGPU \nNvidiaGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#IntelGPU","title":"ArguProcessingUnits.IntelGPU","content":"ArguProcessingUnits.IntelGPU \nIntelGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#AmdGPU","title":"ArguProcessingUnits.AmdGPU","content":"ArguProcessingUnits.AmdGPU \nAmdGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-arguprocessingunits.html#AnyGPU","title":"ArguProcessingUnits.AnyGPU","content":"ArguProcessingUnits.AnyGPU \nAnyGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html","title":"CLIArguments","content":"CLIArguments \n \nCLIArguments.InputPath \nInputPath \nCLIArguments.OutputPath \nOutputPath \nCLIArguments.AgentsSupport \nAgentsSupport \nCLIArguments.ProcessingUnit \nProcessingUnit \nCLIArguments.Transformations \nTransformations"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#InputPath","title":"CLIArguments.InputPath","content":"CLIArguments.InputPath \nInputPath \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#OutputPath","title":"CLIArguments.OutputPath","content":"CLIArguments.OutputPath \nOutputPath \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#AgentsSupport","title":"CLIArguments.AgentsSupport","content":"CLIArguments.AgentsSupport \nAgentsSupport \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#ProcessingUnit","title":"CLIArguments.ProcessingUnit","content":"CLIArguments.ProcessingUnit \nProcessingUnit \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-argucommands-cliarguments.html#Transformations","title":"CLIArguments.Transformations","content":"CLIArguments.Transformations \nTransformations \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cli.html","title":"CLI","content":"CLI \n \nCLI.main \nmain"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cli.html#main","title":"CLI.main","content":"CLI.main \nmain \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html","title":"CPU","content":"CPU \n \nCPU.applyFilter \napplyFilter \nCPU.rotate \nrotate \nCPU.flip \nflip"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html#applyFilter","title":"CPU.applyFilter","content":"CPU.applyFilter \napplyFilter \n\n Applies a filter to an input image\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html#rotate","title":"CPU.rotate","content":"CPU.rotate \nrotate \n\n Rotates an input image either clockwise or counterclockwise\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-cpu.html#flip","title":"CPU.flip","content":"CPU.flip \nflip \n\n Flips an input image either vertically or horizontally\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html","title":"GPU","content":"GPU \n \nGPU.applyFilterGPUKernel \napplyFilterGPUKernel \nGPU.rotateGPUKernel \nrotateGPUKernel \nGPU.flipGPUKernel \nflipGPUKernel \nGPU.applyFilter \napplyFilter \nGPU.rotate \nrotate \nGPU.flip \nflip"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#applyFilterGPUKernel","title":"GPU.applyFilterGPUKernel","content":"GPU.applyFilterGPUKernel \napplyFilterGPUKernel \n\n Creates compiled GPU filter kernel\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#rotateGPUKernel","title":"GPU.rotateGPUKernel","content":"GPU.rotateGPUKernel \nrotateGPUKernel \n\n Creates compiled GPU rotation kernel\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#flipGPUKernel","title":"GPU.flipGPUKernel","content":"GPU.flipGPUKernel \nflipGPUKernel \n\n Creates compiled GPU flip kernel\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#applyFilter","title":"GPU.applyFilter","content":"GPU.applyFilter \napplyFilter \n\n Applies a filter to the specified image using GPU\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#rotate","title":"GPU.rotate","content":"GPU.rotate \nrotate \n\n Rotates the image clockwise or counterclockwise using GPU\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html#flip","title":"GPU.flip","content":"GPU.flip \nflip \n\n Flips the image vertically or horizontally using GPU\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-helper.html","title":"Helper","content":"Helper \n \nHelper.toFlatArray \ntoFlatArray \nHelper.generatePath \ngeneratePath"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-helper.html#toFlatArray","title":"Helper.toFlatArray","content":"Helper.toFlatArray \ntoFlatArray \n\n Converts a 2D array to a flat 1D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-helper.html#generatePath","title":"Helper.generatePath","content":"Helper.generatePath \ngeneratePath \n\n Generates a file path by combining an output directory and an image name\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html","title":"Kernels","content":"Kernels \n \nKernels.gaussianBlurKernel \ngaussianBlurKernel \nKernels.edgesKernel \nedgesKernel \nKernels.darkenKernel \ndarkenKernel \nKernels.lightenKernel \nlightenKernel \nKernels.sharpenKernel \nsharpenKernel"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#gaussianBlurKernel","title":"Kernels.gaussianBlurKernel","content":"Kernels.gaussianBlurKernel \ngaussianBlurKernel \n\n Represents a Gaussian blur kernel for filter applying on CPU  as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#edgesKernel","title":"Kernels.edgesKernel","content":"Kernels.edgesKernel \nedgesKernel \n\n Represents a edges kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#darkenKernel","title":"Kernels.darkenKernel","content":"Kernels.darkenKernel \ndarkenKernel \n\n Represents a darken kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#lightenKernel","title":"Kernels.lightenKernel","content":"Kernels.lightenKernel \nlightenKernel \n\n Represents a lighten kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html#sharpenKernel","title":"Kernels.sharpenKernel","content":"Kernels.sharpenKernel \nsharpenKernel \n\n Represents a sharpen kernel for filter applying on CPU as a 2D array\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage.html","title":"MyImage","content":"MyImage \n \nMyImage.MyImage \nMyImage \nMyImage.load \nload \nMyImage.save \nsave"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage.html#load","title":"MyImage.load","content":"MyImage.load \nload \n\n Loads the image located at the specified file path\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage.html#save","title":"MyImage.save","content":"MyImage.save \nsave \n\n Saves the image to the specified directory in the same extension as the input\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html","title":"MyImage","content":"MyImage \n\n Encapsulates an image, which includes both the byte pixel data and its associated attributes.\n  \nMyImage.\u0060\u0060.ctor\u0060\u0060 \n\u0060\u0060.ctor\u0060\u0060 \nMyImage.Data \nData \nMyImage.Width \nWidth \nMyImage.Height \nHeight \nMyImage.Name \nName"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#\u0060\u0060.ctor\u0060\u0060","title":"MyImage.\u0060\u0060.ctor\u0060\u0060","content":"MyImage.\u0060\u0060.ctor\u0060\u0060 \n\u0060\u0060.ctor\u0060\u0060 \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Data","title":"MyImage.Data","content":"MyImage.Data \nData \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Width","title":"MyImage.Width","content":"MyImage.Width \nWidth \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Height","title":"MyImage.Height","content":"MyImage.Height \nHeight \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-myimage-myimage.html#Name","title":"MyImage.Name","content":"MyImage.Name \nName \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html","title":"Process","content":"Process \n \nProcess.AgentsSupport \nAgentsSupport \nProcess.ProcessingUnits \nProcessingUnits \nProcess.Transformations \nTransformations \nProcess.transformationsParserCPU \ntransformationsParserCPU \nProcess.transformationsParserGPU \ntransformationsParserGPU \nProcess.processImages \nprocessImages"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html#transformationsParserCPU","title":"Process.transformationsParserCPU","content":"Process.transformationsParserCPU \ntransformationsParserCPU \n\n Parses an image transformation and returns the corresponding CPU-based transformation function\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html#transformationsParserGPU","title":"Process.transformationsParserGPU","content":"Process.transformationsParserGPU \ntransformationsParserGPU \n\n Generates GPU kernel functions for applying various image transformations\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process.html#processImages","title":"Process.processImages","content":"Process.processImages \nprocessImages \n\n Processes images located at the specified input path and saves the processed images to the specified output path\n "},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html","title":"AgentsSupport","content":"AgentsSupport \n\n Specifies the level of agents support\n  \nAgentsSupport.Full \nFull \nAgentsSupport.Partial \nPartial \nAgentsSupport.PartialUsingComposition \nPartialUsingComposition \nAgentsSupport.No \nNo"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#Full","title":"AgentsSupport.Full","content":"AgentsSupport.Full \nFull \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#Partial","title":"AgentsSupport.Partial","content":"AgentsSupport.Partial \nPartial \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#PartialUsingComposition","title":"AgentsSupport.PartialUsingComposition","content":"AgentsSupport.PartialUsingComposition \nPartialUsingComposition \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html#No","title":"AgentsSupport.No","content":"AgentsSupport.No \nNo \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html","title":"ProcessingUnits","content":"ProcessingUnits \n\n Represents processing device\n  \nProcessingUnits.CPU \nCPU \nProcessingUnits.GPU \nGPU"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html#CPU","title":"ProcessingUnits.CPU","content":"ProcessingUnits.CPU \nCPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html#GPU","title":"ProcessingUnits.GPU","content":"ProcessingUnits.GPU \nGPU \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html","title":"Transformations","content":"Transformations \n\n Represents the available image transformations\n  \nTransformations.Gauss \nGauss \nTransformations.Sharpen \nSharpen \nTransformations.Lighten \nLighten \nTransformations.Darken \nDarken \nTransformations.Edges \nEdges \nTransformations.RotationR \nRotationR \nTransformations.RotationL \nRotationL \nTransformations.FlipV \nFlipV \nTransformations.FlipH \nFlipH"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Gauss","title":"Transformations.Gauss","content":"Transformations.Gauss \nGauss \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Sharpen","title":"Transformations.Sharpen","content":"Transformations.Sharpen \nSharpen \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Lighten","title":"Transformations.Lighten","content":"Transformations.Lighten \nLighten \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Darken","title":"Transformations.Darken","content":"Transformations.Darken \nDarken \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#Edges","title":"Transformations.Edges","content":"Transformations.Edges \nEdges \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#RotationR","title":"Transformations.RotationR","content":"Transformations.RotationR \nRotationR \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#RotationL","title":"Transformations.RotationL","content":"Transformations.RotationL \nRotationL \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#FlipV","title":"Transformations.FlipV","content":"Transformations.FlipV \nFlipV \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html#FlipH","title":"Transformations.FlipH","content":"Transformations.FlipH \nFlipH \n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/index.html","title":"Introduction to ImageProcessing\n","content":"# Introduction to ImageProcessing\n\n---\n\n## What is ImageProcessing?\n\nImageProcessing is an easy-to-use F# package that utilizes [Brahma.FSharp](https://github.com/YaccConstructor/Brahma.FSharp)\nand [SixLabors.ImageSharph](https://github.com/SixLabors/ImageSharp). It offers two primary image processing options: CPU\nand GPU or agent-supported processing, all accessible within the included console application.\n\n## Why use ImageProcessing?\n\n* Loading images from a local source and saving them.\n* Processing all images within a specified directory.\n* Filtering using one of five kernels, including \u0022Gaussian blur\u0022 and \u0022edges\u0022.\n* Other edits such as 90-degree rotation and flipping.\n* Combinations of existing transformations in four different scenarios.\n* Ability to utilize all of the features solely through the command line.\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/Explanations/Structure.html","title":"Structure","content":"---\ntitle: Structure\ncategory: Explanations\ncategoryindex: 3\nindex: 1\n---\n\n# Structure of ImageProcessing\n\n## Core Concepts\n\n---\n\n### 1. Agents\nThe code uses agents as a fundamental concept for concurrent and asynchronous processing of images. \nAgents are lightweight, concurrent execution units that can receive and process messages independently.\n\n### 2. Image Processing\nImage processing is a key operation performed on images, which involves applying various transformations. \nThese transformations can include filters like Gaussian blur, sharpening, and flip operations (both horizontal and vertical).\n\n### 3. CPU and GPU Processing\nThe code supports image processing on both CPU and GPU platforms. \nCPU processing is done using standard F# functions, while GPU processing utilizes the [Brahma.FSharp](https://github.com/YaccConstructor/Brahma.FSharp) library to leverage the power of Graphics Processing Units for parallel processing.\n\n\n## Diagram\n\n---\n\nThere is a UML diagram representing the dependencies between modules: \n\n![image](https://raw.githubusercontent.com/PolinaSavelyeva/ImageProcessing/main/resources/image_processing_uml.svg)\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/Tutorials/Getting_Started.html","title":"Getting Started","content":"---\ntitle: Getting Started\ncategory: Tutorials\ncategoryindex: 1\nindex: 1\n---\n\n# Getting Started with ImageProcessing\n\n\n## Prepearing\n\n---\n\n### Requirements\n\nFirst of all, make sure the following requirements are installed on your system:\n\n* [dotnet SDK](https://www.microsoft.com/net/download/core) 3.0 or higher (recommended 6.0\u002B),\n* [Mono](http://www.mono-project.com/) if you\u0027re on Linux or macOS or\n* [VSCode Dev Container](https://code.visualstudio.com/docs/remote/containers).\n\nTo find more building and running options take a look at the [MiniScaffold](https://github.com/TheAngryByrd/MiniScaffold) template.\n\n### Package Adding\n\nGo to directory with your \u0060\u0060build.fsproj\u0060\u0060 (or \u0060\u0060build.csproj\u0060\u0060) file and install ImageProcessing using command line:\n\n\u0060\u0060\u0060shell\ndotnet add package ImageProcessing.PolinaSavelyeva --version 1.0.0\n\u0060\u0060\u0060\n\nFor more information visit package main [GitHub page](https://github.com/PolinaSavelyeva/ImageProcessing/pkgs/nuget/ImageProcessing.PolinaSavelyeva).\n\n## Features\n\n---\n\nThe following features are implemented, even for CPU and GPU:\n\n* **Filters**\n    * Gaussian Blur\n    * Edges\n    * Sharpen\n    * Lighten\n    * Darken\n\n\n* **Transformations**\n    * Clockwise rotation\n    * Counterclockwise rotation\n    * Vertical flip (Y-axis)\n    * Horizontal flip (X-axis)\n\n\n* **Multi-threaded processing tools**\n    * Saving agent\n    * Processing agent\n    * Full processing agent, i.e saving plus processing\n    * Events logger\n\n\n* **Directory with pictures processing tool**\n\nFor detailed descriptions of all features above visit [Api Reference](https://polinasavelyeva.github.io/ImageProcessing/reference/index.html).\n\n## Simple Usage\n\n---\n\n### Using CLI\n\nBefore usage, go to specify directory:\n\n\u0060\u0060\u0060sh\ncd /path/to/ImageProcessing/src/ImageProcessing\n\u0060\u0060\u0060\nTo process images from one directory and save them to another, you can use the following commands.\n\n* **\u041Ene transformation applied to each image in the directory**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path -agent=full -unit=cpu gauss\n\u0060\u0060\u0060\n\n* **List of transformations that are sequentially applied**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path  -agent=no -unit=anygpu gauss sharpen\n\u0060\u0060\u0060\n\nYou can find more details about CLI processing [here](https://polinasavelyeva.github.io/ImageProcessing/How_Tos/Using_A_CLI.html).\n\n### Using Your Own Code\n\nOpen library and load image to process:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing\n\nlet myImage = MyImage.load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\u0060\u0060\u0060\n\nCreate new function which sequentially applies blur filter and clockwise rotation to images and saves it on CPU:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E CPU.applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E CPU.rotate true\n    \n    MyImage.save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nCreate the same function for GPU. But before it we need to do some steps for diagnosing graphical device.\n\nDefine the \u0060\u0060device\u0060\u0060 value by specifying the brand of your GPU or whatever the program finds (embedded graphics cards are also suitable). And make OpenCL context of it:\n\n\u0060\u0060\u0060fsharp\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\u0060\u0060\u0060\n\nNext, define new values for filter and rotation functions. This action is necessary because of compiling [kernel function](https://polinasavelyeva.github.io/ImageProcessing/How_Tos/Making_A_Code.html#GPU-processing-kernels) once:\n\n\u0060\u0060\u0060fsharp\nlet applyFilterGPU = GPU.applyFilter clContext 64\nlet rotateGPU = GPU.rotate clContext 64\n\u0060\u0060\u0060\n\nAnd the final function:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    MyImage.save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing\n\nlet myImage = MyImage.load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E CPU.applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E CPU.rotate true\n    \n    MyImage.save rotatedImage pathToSave\n\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\nlet applyFilterGPU = GPU.applyFilter clContext 64\nlet rotateGPU = GPU.rotate clContext 64\n\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    MyImage.save rotatedImage pathToSave\n \nlet pathToSave = \u0022Path/To/Directory/image_name.jpg\u0022\n\napplyCustomFilterOnCPU myImage pathToSave\napplyCustomFilterOnGPU myImage pathToSave\n\u0060\u0060\u0060\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/How_Tos/Making_A_Code.html","title":"How To make a code","content":"---\ntitle: How To make a code\ncategory: How To Guides\ncategoryindex: 2\nindex: 1\n---\n\n# How-To make your own ImageProcessing code\n\n## Implemented Features\n\n---\n\nImageProcessing supports the following features, which you can use when implementing your examples:\n\n* **Filters for CPU/GPU**\n    * Gaussian Blur\n    * Edges\n    * Sharpen\n    * Lighten\n    * Darken\n\n\n* **Transformations for CPU/GPU**\n    * Clockwise rotation\n    * Counterclockwise rotation\n    * Vertical flip (Y-axis)\n    * Horizontal flip (X-axis)\n\n\n* **Multithreaded processing tools**\n    * Saving agent\n    * Processing agent\n    * Full processing agent, i.e saving plus processing\n    * Events logger\n\n\n* **Directory with pictures processing tool**\n\n    Also you can specify:\n  * Processing unit (CPU or GPU)\n  * Agents support\n\nFor detailed descriptions of all features visit [Api Reference](https://polinasavelyeva.github.io/ImageProcessing/reference/index.html).\n\n\n\n## Processing on CPU\n\n---\n\n### CPU filter kernels\n\nFilter kernels are used to call \u0060\u0060applyFilter\u0060\u0060 function. \nYou can create 2D float32 array as new kernel or use implemented [kernels](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html) such as:\n\n* Gaussian Blur\n* Edges\n* Sharpen\n* Lighten\n* Darken\n\n### Multi-threaded processing on CPU\n\nYou can use either single-threaded CPU-based image processing or multi-threaded image processing.\nMultithreading is performed using logger and agent functions, which is specified in this [section](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html).\n\nFour of them are implemented:\n\n* Logger, which is used to inform user about status of operations, i.e work of another agents\n* Saver agent, which is used to save images stored in queue and to send messages to logger\n* Processing agent, which is used to process images stored in queue using specified transformation and to send messages to logger\n* Full processing agent, which does both saving and processing \n\n\n### Simple CPU Example\n\nOpen library and load image to process:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.CPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\u0060\u0060\u0060\n\nCreate new function which sequentially applies blur filter and clockwise rotation to images and saves the result:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotate true\n    \n    save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.CPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\nlet applyCustomFilterOnCPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilter gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotate true\n    \n    save rotatedImage pathToSave\n \nlet pathToSave = \u0022Path/To/Directory/image_name.jpg\u0022\n\napplyCustomFilterOnCPU myImage pathToSave\n\u0060\u0060\u0060\n\n## Processing on GPU\n\n---\n\n### GPU filter kernels\n\nFilter kernels are used to call \u0060\u0060applyFilter\u0060\u0060 function.\nYou can create 2D float32 array as new kernel or use implemented [kernels](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-kernels.html) such as:\n\n* Gaussian Blur\n* Edges\n* Sharpen\n* Lighten\n* Darken\n\n### GPU processing kernels\n\nGPU kernels are used to call GPU-processing functions.\nThey have specific defining style, so for more information about how they work I recommended to visit [Brahma.Fsharp tutorial](https://yaccconstructor.github.io/Brahma.FSharp/Articles/Custom_Kernels.html).\nBut if you have no need in creating new GPU kernels just use implemented [ones](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-gpu.html), such as:\n\n* \u0060\u0060applyFilterGPUKernel\u0060\u0060\n* \u0060\u0060rotateGPUKernel\u0060\u0060\n* \u0060\u0060flipGPUKernel\u0060\u0060\n\nAll of them take \u0060\u0060clContext\u0060\u0060 (which is device\u0027s environment abstraction) and \u0060\u0060localWorkSize\u0060\u0060 (which shows the size of local work group) as input parameters.\n\n### Multi-threaded processing on GPU\n\nYou can use either single-threaded GPU-based image processing or multi-threaded image processing.\nMultithreading is performed using logger and agent functions, which specified in this [section](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-agents.html).\n\nFour of them are implemented:\n\n* Logger, which is used to inform user about status of operations, i.e work of another agents\n* Saver agent, which is used to save images stored in queue and to send messages to logger\n* Processing agent, which is used to process images stored in queue using specified transformation and to send messages to logger\n* Full processing agent, which does both saving and processing\n\n### Simple GPU Example\n\nOpen library and load image to process:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.GPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\u0060\u0060\u0060\n\nBefore creating our function we need to do some steps for diagnosing graphical device.\n\nDefine the \u0060\u0060device\u0060\u0060 value by specifying the brand of your GPU or whatever the program finds (embedded graphics cards are also suitable). \nAnd make OpenCL context of it:\n\n\u0060\u0060\u0060fsharp\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\u0060\u0060\u0060\n\nNext, define new values for filter and rotation functions. \nThis action is necessary because of compiling [kernel function](https://polinasavelyeva.github.io/ImageProcessing/How_Tos/Making_A_Code.html#GPU-processing-kernels) once:\n\n\u0060\u0060\u0060fsharp\nlet applyFilterGPU = applyFilter clContext 64\nlet rotateGPU = rotate clContext 64\n\u0060\u0060\u0060\n\nCreate new function which sequentially applies blur filter and clockwise rotation to images and saves the result:\n\n\u0060\u0060\u0060fsharp\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    save rotatedImage pathToSave\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.MyImage\nopen ImageProcessing.GPU\n\nlet myImage = load (\u0022Full/Path/To/Images/Folder/image_name.jpg\u0022)\n\nlet device = Brahma.FSharp.ClDevice.GetFirstAppropriateDevice()\nlet clContext = Brahma.FSharp.ClContext(device)\n\nlet applyFilterGPU = applyFilter clContext 64\nlet rotateGPU = rotate clContext 64\n\nlet applyCustomFilterOnGPU (image: MyImage) (pathToSave : string) = \n    let blurredImage = image |\u003E applyFilterGPU gaussianBlurKernel\n    let rotatedImage = blurredImage |\u003E rotateGPU true\n    \n    save rotatedImage pathToSave\n \nlet pathToSave = \u0022Path/To/Directory/image_name.jpg\u0022\n\napplyCustomFilterOnGPU myImage pathToSave\n\u0060\u0060\u0060\n\n## Processing of Multiple Images via Directories\n\n---\n\n### Process parameters\n\nThe \u0060\u0060processImage\u0060\u0060 function is designed to process directories with various configuration options. \nIt allows you to choose the type of [agent support](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html) for processing:\n\n* \u0060\u0060Full\u0060\u0060, which uses a single agent for opening, processing and saving\n* \u0060\u0060Partial\u0060\u0060, which uses different agents for each transformation and saving\n* \u0060\u0060PartialUsingComposition\u0060\u0060, which uses one agent for transformation and one for saving\n* \u0060\u0060No\u0060\u0060, which uses naive image processing function\n\nAnd define a list of [transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) to apply to the image, and specify the [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html) (CPU or GPU) for the operation. \n\n### Simple Directory Processing Example\n\nOpen library and define directories:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.Process\nopen ImageProcessing.AgentSupport\n\nlet inputDirectory = \u0022Full/Path/To/Input/Images/Folder/\u0022\nlet outputDirectory = \u0022Full/Path/To/Output/Images/Folder/\u0022\n\u0060\u0060\u0060\n\nDefine list of [transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) and filters that will be used:\n\n\u0060\u0060\u0060fsharp\nlet imageEditorsList = [Darken; Edges; RotationL]\n\u0060\u0060\u0060\n\nNote that transformations and filters will be applied sequentially, one-by-one on each image in the specific directory. Choose and define [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html#CPU) and [multithreading mode](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html).\n\n\u0060\u0060\u0060fsharp\nlet processingUnit = GPU Brahma.FSharp.Platform.Nvidia\nlet agentsSupport = AgentSupport.Full\n\u0060\u0060\u0060\n\nThe result:\n\n\u0060\u0060\u0060fsharp\nopen ImageProcessing.Process\nopen ImageProcessing.AgentSupport\n\nlet inputDirectory = \u0022Full/Path/To/Input/Images/Folder/\u0022\nlet outputDirectory = \u0022Full/Path/To/Output/Images/Folder/\u0022\n\nlet imageEditorsList = [Darken; Edges; RotationL]\n\nlet processingUnit = GPU Brahma.FSharp.Platform.Nvidia\nlet agentsSupport = AgentSupport.Full\n\nprocessImages inputDirectory outputDirectory processingUnit imageEditorsList agentsSupport\n\u0060\u0060\u0060\n\n"},{"uri":"https://PolinaSavelyeva.github.io/ImageProcessing/How_Tos/Using_A_CLI.html","title":"How To use CLI","content":"---\ntitle: How To use CLI\ncategory: How To Guides\ncategoryindex: 2\nindex: 2\n---\n\n# How-To use ImageProcessing CLI\n\n## Overview\n\n---\n\nThe CLI accepts several command-line arguments that control the behavior of the image processing application. \nBelow is a list of available command-line arguments and their descriptions.\n\n### InputPath\n\n* **Syntax:** \u0060-in \u003CinputPath\u003E\u0060\n* **Description:** Specifies the path to a file or directory where the images to be processed are located.\n\n### OutputPath\n\n* **Syntax:** \u0060-out \u003CoutputPath\u003E\u0060\n* **Description:** Specifies the path to a file or directory where the processed images will be saved.\n\n### AgentsSupport\n\n* **Syntax:** \u0060-agent=\u003CagentType\u003E\u0060\n* **Description:** Allows you to specify the [agent strategy](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-agentssupport.html) to be used during image processing.  You can choose from the following options:\n  * \u0060\u0060Full\u0060\u0060, which uses a single agent for opening, processing and saving\n  * \u0060\u0060Partial\u0060\u0060, which uses different agents for each transformation and saving\n  * \u0060\u0060PartialUsingComposition\u0060\u0060, which uses one agent for transformation and one for saving\n  * \u0060\u0060No\u0060\u0060, which uses naive image processing function\n\n### ProcessingUnit\n\n* **Syntax:** \u0060-unit=\u003CunitType\u003E\u0060\n* **Description:** Specifies the [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html) to be used for image processing. You can choose from the following options:\n  * \u0060\u0060CPU\u0060\u0060\n  * \u0060\u0060NvidiaGPU\u0060\u0060\n  * \u0060\u0060IntelGPU\u0060\u0060\n  * \u0060\u0060AmdGPU\u0060\u0060\n  * \u0060\u0060AnyGPU\u0060\u0060\n\n### Transformations\n\n- **Syntax:** \u0060\u003Ctransformation1\u003E \u003Ctransformation2\u003E ...\u0060\n- **Description:** Provides a list of [available transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) to be applied during image processing. You can choose from the following options:\n  * \u0060\u0060Gauss\u0060\u0060\n  * \u0060\u0060Sharpen\u0060\u0060\n  * \u0060\u0060Lighten\u0060\u0060\n  * \u0060\u0060Darken\u0060\u0060\n  * \u0060\u0060Edges\u0060\u0060\n  * \u0060\u0060RotationR\u0060\u0060\n  * \u0060\u0060RotationL\u0060\u0060\n  * \u0060\u0060FlipV\u0060\u0060\n  * \u0060\u0060FlipH\u0060\u0060\n\n## Usage\n\n---\n\nBefore usage, go to specify directory:\n\n\u0060\u0060\u0060sh\ncd /path/to/ImageProcessing/src/ImageProcessing\n\u0060\u0060\u0060\n\nTo process images from one directory and save them to another, you can use the following commands.\n\n* **\u041Ene transformation applied to each image in the directory**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path -agent=full -unit=cpu gauss\n\u0060\u0060\u0060\n\n* **List of transformations that are sequentially applied**\n\n\u0060\u0060\u0060sh\ndotnet run -in /input/path -out /output/path  -agent=no -unit=anygpu gauss sharpen\n\u0060\u0060\u0060\n\n## Examples\n\n---\n\nBefore usage, go to specify directory:\n\n\u0060\u0060\u0060sh\ncd /path/to/ImageProcessing/src/ImageProcessing\n\u0060\u0060\u0060\n\n1. Process images using the CPU with Gauss filter:\n   \u0060\u0060\u0060sh\n   dotnet run -in \u0022input_directory\u0022 -out \u0022output_directory\u0022 -unit=cpu gauss\n   \u0060\u0060\u0060\n\n2. Process images using an Nvidia GPU with full agent support and rotations:\n   \u0060\u0060\u0060sh\n   dotnet run -in \u0022input_directory\u0022 -out \u0022output_directory\u0022 -unit=NvidiaGPU -agent=Full -rotationl -rotationr\n   \u0060\u0060\u0060\n   \n"}]
    \ No newline at end of file
    diff --git a/docsSrc/How_Tos/Making_A_Code.md b/docsSrc/How_Tos/Making_A_Code.md
    index da5df48..2904e6d 100644
    --- a/docsSrc/How_Tos/Making_A_Code.md
    +++ b/docsSrc/How_Tos/Making_A_Code.md
    @@ -230,7 +230,7 @@ It allows you to choose the type of [agent support](https://polinasavelyeva.gith
     * ``PartialUsingComposition``, which uses one agent for transformation and one for saving
     * ``No``, which uses naive image processing function
     
    -And define a list of [transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) to apply to the image, and specify the [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/process-processingunits.html) (CPU or GPU) for the operation. 
    +And define a list of [transformations](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-transformations.html) to apply to the image, and specify the [processing unit](https://polinasavelyeva.github.io/ImageProcessing/reference/imageprocessing-process-processingunits.html) (CPU or GPU) for the operation. 
     
     ### Simple Directory Processing Example