Image manipulation
Image manipulation means altering the appearance of an image. There could be numerous reasons why we want to manipulate a picture. In some cases we would like to improve the quality of our images and sometimes we would like to distort our image to prevent the recording or displaying of something. The Ozeki Camera SDK has an ImageManipulation class that provides countless opportunities, for example the adjustment of brightness, contrast correction, rotating the pictures, adding various filters to it, etc..
Advantages and disadvantages
The biggest advantage of this class that the manipulations happen on the client side, therefore if we would like to display the image of the camera to multiple location, the original image will not be manipulated, and the other clients will get the normal image. However, if the camera have these options and we used them, every clients will receive the manipulated image from the camera.
Unfortunately, there are some disadvantages of manipulating as well. Due to the filters change every pixel of an image, they require resources to calculate the new values, so the display can lose quality or speed. The more filters we use, the slower the display becomes
The features and using of the class
Properties
IsRunning: Boolean type property, which returns true if the instance of the VideoHandler was started false if it was not.
Methods
- Start(): We can start the manipulation using this method. Therefore the image of the camera or video which was connected with the object of the manipulation class will be change according to the selected filters.
- Stop(): You can stop the manipulation with this method, hence your pictures will not change.
- Remove(IFilter filter): This method wipes the submitted filter from the set of selected filters.
- Add(IFilter filter): This method adds the submitted filter to the set of selected filters.
- Clear(IFilter filter): This method deletes all the filters from the manipulation.
Usage
At first, you have to create an object of ImageManipulation. Then a sender, which provides the image has to be connected with this object by the connector method of an object of MediaConnector. After that you have to add some filters using the Add method. Then you will have to use the Start method in order to start the manipulation. If you connect the ImageManipulation object as a sender with a player or recorder, you will be able to show or save the manipulated image.
Related Pages
Conclusion
With the help of the following lectures you will be able to successfully implement image manipulation methods with your C# camera application using the Ozeki Camera SDK.
FAQ
Below you can find the answers for the most frequently asked questions related to this topic:
-
What kind of developer environment is needed?
- Microsoft Visual Studio 2010
- Microsoft .Net Framework 4.0
- Internet connection
-
How can I get the URL of the camera?
You can get the URL from the producer of the camera.
-
I have not managed to build the solution. How to solve it?
- Please set the Target framework property of the project to .NET 4.0.
- You should add the OzekiSDK.dll to the references of the solution.
- Please import the missing classes.
More information
- Introduction to image manipulation
- How to implement brightness filter in C#
- How to create channel filtering in C#
- How to create contrast correction in C#
- How to implement gamma correction in C#
- How to implement greyscale effect in C#
- How to implement histogram equalization in C#
- How to accomplish rotate filter in C#
- How to accomplish invert colors in C#
- How to accomplish jitter in C#
- How to create mirror effect in C#
- How to accomplish pixellate in C#
- How to implement rotate channels in C#
- How to implement hue modifier in C#
- How to implement salt and pepper noise in C#
- How to create saturation correction in C#
- How to create sepia effect in C#
- How to implement sharpen in C#
- How to implement simple posterization in C#
- How to create water wave in C#
- How to implement YCbCr in C#