dotnet / dotnet/machinelearning-samples

Pre-Process Image (Brightness, Contrast, Greyscale)

Open
#1,040 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
4.7k
Forks
2.7k
Avg merge
2d 22h
Merged PRs (30d)
1

Description

**Pre-Process Image (Brightness, Contrast, Greyscale)**

I am working on a project which will detect custom shapes

Code Snippet below
ObjectDetection.ModelInput modelInput = new ObjectDetection.ModelInput
{
Image = MLImage.CreateFromFile(selectedFilePath) // selectedFilePath is the image file path
};
var modelOutput = ObjectDetection.Predict(modelInput);

I want to preprocess the image and feed it to the input model.
**Preprocess means adjusting Brightness, Contrast or Greyscale**

so how do we convert System.Drawing.Image to MLImage

simple workflow
Capture Image -> Adjust Brightness, Contrast -> Feed the image to input image -> We get prediction boxes -> Process the Box area

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.