Skip to content

andrewchencodex/Cloudmersive.APIClient.NET.ImageRecognition

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudmersive.APIClient.NET.ImageRecognition - the C# library for the imageapi

Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.

This C# SDK is:

  • API version: v1
  • SDK version: 3.1.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Cloudmersive.APIClient.NET.ImageRecognition.Api;
using Cloudmersive.APIClient.NET.ImageRecognition.Client;
using Cloudmersive.APIClient.NET.ImageRecognition.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Cloudmersive.APIClient.NET.ImageRecognition.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.ImageRecognition.Api;
using Cloudmersive.APIClient.NET.ImageRecognition.Client;
using Cloudmersive.APIClient.NET.ImageRecognition.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            // Configure API key authorization: Apikey
            Configuration.Default.ApiKey.Add("Apikey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Apikey", "Bearer");

            var apiInstance = new ArtisticApi();
            var style = style_example;  // string | The style of the painting to apply.  To start, try \"udnie\" a painting style.  Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
            var imageFile = new System.IO.Stream(); // System.IO.Stream | Image file to perform the operation on.  Common file formats such as PNG, JPEG are supported.

            try
            {
                // Transform an image into an artistic painting automatically
                byte[] result = apiInstance.ArtisticPainting(style, imageFile);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ArtisticApi.ArtisticPainting: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ArtisticApi ArtisticPainting POST /image/artistic/painting/{style} Transform an image into an artistic painting automatically
ConvertApi ConvertToBmp POST /image/convert/to/bmp Convert input image to Bitmap BMP format
ConvertApi ConvertToGif POST /image/convert/to/gif Convert input image to GIF format
ConvertApi ConvertToJpg POST /image/convert/to/jpg/{quality} Convert input image to JPG, JPEG format
ConvertApi ConvertToPhotoshop POST /image/convert/to/psd Convert input image to Photoshop PSD format
ConvertApi ConvertToPng POST /image/convert/to/png Convert input image to PNG format
ConvertApi ConvertToTiff POST /image/convert/to/tiff Convert input image to TIFF format
ConvertApi ConvertToWebP POST /image/convert/to/webp Convert input image to WebP format
EditApi EditAutoOrient POST /image/edit/auto-orient/remove-exif Normalizes image rotation and removes EXIF rotation data
EditApi EditCompositeBasic POST /image/edit/composite/{location} Composite two images together
EditApi EditCompositePrecise POST /image/edit/composite/precise Composite two images together precisely
EditApi EditContrastAdaptive POST /image/edit/contrast/{gamma}/adaptive Adaptively adjust the contrast of the image to be more appealing and easy to see
EditApi EditCropCircle POST /image/edit/crop/circle/{left}/{top}/{radius} Crop an image to an circular area
EditApi EditCropRectangle POST /image/edit/crop/rectangle/{left}/{top}/{width}/{height} Crop an image to a rectangular area
EditApi EditDrawPolygon POST /image/edit/draw/polygon Draw a polygon onto an image
EditApi EditDrawRectangle POST /image/edit/draw/rectangle Draw a rectangle onto an image
EditApi EditDrawText POST /image/edit/draw/text Draw text onto an image
EditApi EditDropShadow POST /image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity} Add a customizeable drop shadow to an image
EditApi EditInvert POST /image/edit/invert Invert, negate the colors in the image
EditApi EditRemoveExifData POST /image/edit/remove-exif Remove EXIF data from the image
EditApi EditRemoveTransparency POST /image/edit/remove-transparency Remove transparency from the image
EditApi EditRotate POST /image/edit/rotate/{degrees}/angle Rotate an image any number of degrees
FaceApi FaceCompare POST /image/face/compare-and-match Compare and match faces
FaceApi FaceCropFirst POST /image/face/crop/first Crop image to face with square crop
FaceApi FaceCropFirstRound POST /image/face/crop/first/round Crop image to face with round crop
FaceApi FaceDetectAge POST /image/face/detect-age Detect the age of people in an image
FaceApi FaceDetectGender POST /image/face/detect-gender Detect the gender of people in an image
FaceApi FaceLocate POST /image/face/locate Detect and find faces in an image
FaceApi FaceLocateWithLandmarks POST /image/face/locate-with-landmarks Detect and find faces and landmarks eyes and nose and mouth in image
FilterApi FilterBlackAndWhite POST /image/filter/black-and-white Convert image to black-and-white grayscale
FilterApi FilterDespeckle POST /image/filter/despeckle Despeckle to remove point noise from the image
FilterApi FilterEdgeDetect POST /image/filter/edge-detect/{radius} Detect and highlight edges in an image
FilterApi FilterEmboss POST /image/filter/emboss/{radius}/{sigma} Emboss an image
FilterApi FilterGaussianBlur POST /image/filter/blur/guassian/{radius}/{sigma} Perform a guassian blur on the input image
FilterApi FilterMotionBlur POST /image/filter/blur/motion/{radius}/{sigma}/{angle} Perform a motion blur on the input image
FilterApi FilterPosterize POST /image/filter/posterize Posterize the image by reducing distinct colors
FilterApi FilterSwirl POST /image/filter/swirl Swirl distort the image
InfoApi InfoGetDominantColor POST /image/get-info/dominant-color Returns the dominant colors of the image
InfoApi InfoGetMetadata POST /image/get-info/metadata Returns the image metadata including EXIF and resolution
NsfwApi NsfwClassify POST /image/nsfw/classify Not safe for work (NSFW) content classification for Images
NsfwApi NsfwClassifyAdvanced POST /image/nsfw/classify/advanced Advanced content moderation and not safe for work (NSFW) content classification for Images
NsfwApi NsfwClassifyDocument POST /image/nsfw/classify/document Not safe for work (NSFW) content classification for Documents
NsfwApi NsfwClassifyVideo POST /image/nsfw/classify/video Not safe for work (NSFW) content classification for Video
RecognizeApi RecognizeDescribe POST /image/recognize/describe Describe an image in natural language
RecognizeApi RecognizeDetectAndUnskewDocument POST /image/recognize/detect-document/unskew Detect and unskew a photo of a document
RecognizeApi RecognizeDetectObjects POST /image/recognize/detect-objects Detect objects including types and locations in an image
RecognizeApi RecognizeDetectPeople POST /image/recognize/detect-people Detect people including locations in an image
RecognizeApi RecognizeDetectTextFine POST /image/recognize/detect-text/fine Detect fine text in a photo of a document
RecognizeApi RecognizeDetectTextLarge POST /image/recognize/detect-text/large Detect large text in a photo
RecognizeApi RecognizeDetectVehicleLicensePlates POST /image/recognize/detect-vehicle-license-plates Detect vehicle license plates in an image
RecognizeApi RecognizeFindSymbol POST /image/recognize/find/symbol Find the location of a symbol in an image
RecognizeApi RecognizeSimilarityCompare POST /image/recognize/similarity/compare Compare two images for similarity
RecognizeApi RecognizeSimilarityHash POST /image/recognize/similarity/hash Generate a perceptual image hash
RecognizeApi RecognizeSimilarityHashDistance POST /image/recognize/similarity/hash/distance Calculates the similarity between two perceptual image hashes
ResizeApi ResizePost POST /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} Resize an image while preserving aspect ratio
ResizeApi ResizeResizeAISuperSampling POST /image/resize/ai/target Resize an image with AI super sampling
ResizeApi ResizeResizeSimple POST /image/resize/target/{width}/{height} Resize an image
TextGenerationApi TextGenerationCreateHandwritingPng POST /image/text/create/handwriting/png Create an image of handwriting in PNG format

Documentation for Models

Documentation for Authorization

Apikey

  • Type: API key
  • API key parameter name: Apikey
  • Location: HTTP header

About

.NET Framework Client for Cloudmersive Image Recognition APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 99.0%
  • Other 1.0%