GStreamer Color Transfer Basics

From RidgeRun Developer Connection
Jump to: navigation, search


  Index Next: Evaluating GstColorTransfer





This page describes the fundamentals of RidgeRun's GStreamer Color Transfer Element. After reading this page it should be clear if the plug-in meets your application requirements by using any of its different configurations.

Color transfer between images

GstColorTransfer is a plugin that performs a color transference between 2 streams. The first stream is the reference and is the one that determines the color probability distribution of the output. On the other hand the output image preserves the same spatial features than the target stream. In other words, the color transfer process consists on taking the colors of the reference image and using them to color a target image. It can be used for color consistency, improved image stitching, automated coloring, and many more applications. Color mapping algorithms can be classified on 3 broad categories:

  • Statistical: Any algorithm that transfer color histogram or probability density function (PDF) properties from one image to another.
  • Geometry based: Uses point or region correspondence as part of the algorithm.
  • User assisted: The user defines regions to match or color to use on each region.

GstColorTransfer

GstColorTransfer is a geometry based color transfer algorithm (automatic overlap region matching is not implemented on the current release) that can be user assisted to specify the overlap region manually. The objective of the element Is to improve two images color consistency to achieve a better stitching between two streams.

Color consistency is an usual problem on systems that capture from several cameras simultaneously. Even if all the cameras used are the same model, sometimes capture parameters or even fabrication defects can cause the capture images' colors to look completely unconsistent. An example of this problem is the following images. Even though both images where captured with the same camera just moving the camera a little to the right, due to the illumination conditions on each capture, the colors look bad when trying to stitch them together.

Original image, 2 images 3264x2448px with some overlap and different color conditions

GstColorTransfer uses PDF transfer on a region determined by the user to correct this problem. By transferring the PDF a color consistency effect is achieved, as seen in the following image.

Color transfer results


  Index Next: Evaluating GstColorTransfer