You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taking as an input a video frame of dimensions ``1000x1000``, this example creates a cropped source rectangle of dimensions ``800x800``, starting at coordinates ``500,200`` and displays it on screen at coordinates ``200,100`` keeping the same dimensions as source rectangle i.e ``800x800`` without scaling.
725
+
Taking as an input a video frame of dimensions ``1000x1000``, this example creates a cropped source rectangle of dimensions ``800x800``, starting at coordinates ``500,200`` and displays it on screen at coordinates ``200,100`` keeping the same dimensions as source rectangle i.e ``800x800`` without scaling.
726
726
727
727
.. figure:: /images/DSS_cropping_example_3.jpg
728
728
:height:600
729
729
:width:1020
730
730
731
+
- **Gamma Correction**
732
+
733
+
Gamma correction or gamma is used to adjust the brightness and color of images on a display. It is applied to ensure that the image appears as intended, with accurate brightness and color representation. Displays, such as LCDs and OLEDs, do not respond linearly to input signals. This means that the display's brightness does not increase linearly with the input voltage. Gamma correction compensates for this non-linear response by applying a non-linear transformation to the input signal. Gamma correction is typically applied using a look-up table (LUT) or a mathematical formula. The LUT or formula maps the input pixel values to output values that have been adjusted to compensate for the display’s non-linear response. DSS7 uses a look-up table for gamma correction. The gamma correction curve is usually represented by a power-law function, where the output value is proportional to the input value raised to a power.
734
+
735
+
.. math::
736
+
737
+
V_{out} = AV_{in}^\gamma
738
+
739
+
To show the effects of Gamma Correction, we have used a script(`<https://github.com/tomba/kmsxx/blob/master/py/tests/gamma.py>`__) that can be used directly from user-space. The script creates and sets the gamma look-up table using gamma value as 2.2. To use the script, first weston/display-manager should be stopped, see :ref:`stopping-weston`.
740
+
741
+
Now, save the script and run it.
742
+
743
+
.. code-block:: console
744
+
745
+
$ python3 gamma.py
746
+
press enter to apply gamma
747
+
748
+
press enter to remove gamma
749
+
750
+
press enter to exit
751
+
752
+
Below is the test pattern image with gamma correction applied
753
+
754
+
.. figure:: /images/DSS_example_with_gamma.jpg
755
+
:height:670
756
+
:width:1020
757
+
758
+
Below is the test pattern image without gamma correction
0 commit comments