Skip to content
Snippets Groups Projects
user avatar
Vojtěch Tomas authored
80482046
History

Domácí úkoly MI-AIM

Zdrojové kódy jsou ve složce src, úkoly jsou psané v C++, pro načítání a ukládání obrázků je použita knihovna STB (vybrané části).

Hotovo:

  • načítání obrazu
  • ukládání obrazu
  • interaktivní interface/psaní věcí okolo...
  • monadické operace krom ekvalizace
  • ekvalizace histogramu

Todo:

  • refaktorovat výpočet histogramu
  • přepsat šílenou část s if v interface
  • ft - amplitudové spektrum

1. úkol - Monadické operace

Výsledky jsou uloženy ve složce monadic spolu s podrobnějším popisem.

Řešení domácích úkolů je koncipované jako jednoduchý commandline editor, do kterého budou postupně přidávány jednotlivé funkcionality.

Kompilace

Je přiložen Makefile, vše by mělo fungovat na všech platformách (snad), jiné závislosti nejsou třeba. Vyvíjím na Linuxu.

Ovládání

command <parameter> (optional parameter)

open <filename>
       loads image from file onto image stack

drop <stack index>
       drop first image with corresponding
       filename from image stack

images
      list all images loaded on image stack

save <stack index> <png|jpg> <output name>
      save image into a file with chosen format

histogram (filename)
      draw histogram of the image on top of the stack
      or save the histogram it into .png file

negative
      negate the image on top of the image stack

threshold <value from <0, 1>>
      threshold the image on top of the image stack

brightness <value from <-1, 1>>
      adjust brightness of the iamge
      on top of the image stack

contrast <value from <0, inf)>
      adjust the contrast of the image
      on top of the image stack

gamma <value from <0, 1>>
      gamma correction of the image
      on top of the image stack

nonlincontrast <value from <0, 1>>
      nonlinear contrast correction of the image
      on top of the image stack

logscale <value from (0, inf)>
      logaritmical scale of the image
      on top of the image stack

quantize <integer value from <1, inf>>
      quantize the image
      on top of the image stack

exit
      exit the application