5-28-2024: How to make your first image filter (draft)

Link to the document

Link to the calculation sheet

 

 

How to make your first image filter

Scope

This article is about making his/her first own image filter, with the help of a calculation sheet, as a pixel map

 handling editor, based on an example as depicted by the two following snips:

Left, original image, right, filtered image consisting of shading the bottom part of the image.



Zoom on a shirt fabric


A 100px by 97px



Vertical flip

In paint editor (to match the hexadecimal editing, in my case)



Unformatted Editor

Shunking the file to a defined number of bytes: trial and error decoding (24 bytes bitmap).


Bitmap format school:

See https://en.wikipedia.org/wiki/BMP_file_format


How to edit an unformatted file (to hexadecimal):

Resource


The three lines of 18 bytes are the header of the bitmap.

Then, three bytes for each R, G, B coordinate in the RGB colorspace, for each bit.


The first pixel has hex code #669EAB, then follows, 100 x 3 (columns)  x 97 (lines) bytes of R or G or B

 hexadecimal values.

What happens in the calculation sheet

The Red bitmap -scaled from 0 as white to 255 as (255,0,0)-.

All the R coordinates are mapped here.


The Green bitmap -scaled from 0 as white to 255 as (0,255,0)-.

All the G coordinates are mapped here.






The Blue bitmap -scaled from 0 as white to 255 as (0,255,0)-.

All the B coordinates are mapped here.


Summary for the original image decomposition

The first patch is the full image.


Summary for the filtered image decomposition



The filter is just a weighting of each line, darkening the upper lines, and keeping the bottom lines, as is, 

unchanged.


The last patch is the recomposition of each R, G and B.


Link to the calculation sheet




See how the pixels are well shaped to squares !

Final image

(Reflipped in normal orientation).



Drill1

Drill about filters (called colors in Google Slides). In Google Slides, find the correct filters, (top left is the original image).


Drill2

Drill about filters (called adjustments in Google Slides). In Google Slides, find the correct adjustments, of 

opacity, contrast, and brightness (the middle image is the original image).


Drill3

Drill about filters. Find how to use the following presets in MS Point.


Presets

sharpen/soften


Brightness/contrast






 

Comments

Popular posts from this blog

5-25-2024: LEDs