Multithreaded Programming Techniques in C#

The age of single core CPUs in computing is long gone. As processing power increases and multiple processing cores get stacked into a single silicon chip, the applications we write too need to be optimized to utilize the underlying hardware it runs on.
Though we overlook at times and focus ourselves more on the business logic implemented, in the long run in terms of usability and scalability applications would need to be revised and thought through for better optimization.

Multithreading however helps in solving the following.

  • Improved responsiveness of applications.
  • Maximize utilization and performance.
  • Concurrent access to resources.

Continue reading

Contour Identification of an Image using C# and EmguCV

Finding Contours can be useful in creating masks for images and to segment and extract features from an image. Its used by Meteorologists to understand weather maps and for analysis and forecasts. The following post describes how contours could be identified in an image.

Implementation would be based on EmguCV the popular .NET ported version of OpenCV. Even though OpenCV is built in C++, EmguCV provides a wrapper which manages to invoke the same OpenCV libraries.By use of the EmguCV wrapper it provides all the necessary functions as well as data types of OpenCV in a .NET compliant library making it easier to implement.

Continue reading

Using Vector (SVG) Graphics in C# .NET


Scalable vector graphics(SVG), has been widely popular currently in terms of rendering web graphics. When compared with Raster images, Vector images (SVG image types) have the following advantages.

  • As the name implies Vector SVG graphics are scaleable and do not pixelate at higher zoom levels.
  • Vector image scaled

    Vector image scaled

    Raster image pixelated after resizing

    Raster image pixelated after resizing

  • Vector graphics are formed using basic shapes, mathematical paths and lines. Because of this it is easier to understand sub parts that make up the vector image.
  • SVG files are XML files therefore customizing them and making changes is easier than manipulating binary raster images.

Continue reading