Skip to content

CEU_L5_CMYKApp

hecyebesdelpino edited this page May 12, 2021 · 7 revisions

Images are constructed from three overlaid intensity maps:

  • Each map represents the intensity of a different primary color. The most common used are the RGB (red, green, blue colors)
  • The hues of the primaries do not matter as long as they are distinct.
  • The primaries are 3 vectors (or axes) that form a “basis” of the color space.

Each color corresponds to a point in a 3D vector space

link1

According to the position of the axis, we could have the RGB model or the CMY

Link2 Link3

To obtain the values of CMY from the RGB, it can be applied the following formula:

Link4

This is the interface of the application: Link6

This is the figure after executing with the CMYK button pressed:

Link7

This is the figure after executing with the RGB button pressed:

Link 8

The code for computing the CMYK is the following:

Link5

The application reads an image (for example: 'fluorescenceCells.jpg'), takes the values of each channel:

  • Red (Layer 1)
  • Green (Layer 2)
  • Blue (Layer 3) Then, the CMY colors are calculated following the formula previously commented. It's important to cast the values to double type, and after that, casting again to uint8 type. As we are working with integers of 8 bits, each color is multiplied by 255 (maximum value 2^8) on each channel. Afterwards, each channel and the combination of the three of them are plot

Here is a video showing how the application works: https://youtu.be/xSS_hf95M1U

Clone this wiki locally