diff --git a/ora4/.idea/.gitignore b/ora4/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/ora4/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/ora4/.idea/editor.xml b/ora4/.idea/editor.xml new file mode 100644 index 0000000..963c96f --- /dev/null +++ b/ora4/.idea/editor.xml @@ -0,0 +1,344 @@ + + + + + \ No newline at end of file diff --git a/ora4/.idea/misc.xml b/ora4/.idea/misc.xml new file mode 100644 index 0000000..53624c9 --- /dev/null +++ b/ora4/.idea/misc.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/ora4/.idea/vcs.xml b/ora4/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/ora4/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ora4/KossuthSquare/SnapShot-20180731_173715.jpg b/ora4/KossuthSquare/SnapShot-20180731_173715.jpg new file mode 100644 index 0000000..77a227c Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173715.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173716.jpg b/ora4/KossuthSquare/SnapShot-20180731_173716.jpg new file mode 100644 index 0000000..cdea1b6 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173716.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173717.jpg b/ora4/KossuthSquare/SnapShot-20180731_173717.jpg new file mode 100644 index 0000000..70c1dde Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173717.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173719.jpg b/ora4/KossuthSquare/SnapShot-20180731_173719.jpg new file mode 100644 index 0000000..41e3124 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173719.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173721.jpg b/ora4/KossuthSquare/SnapShot-20180731_173721.jpg new file mode 100644 index 0000000..36077e9 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173721.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173723.jpg b/ora4/KossuthSquare/SnapShot-20180731_173723.jpg new file mode 100644 index 0000000..84dfae3 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173723.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173724.jpg b/ora4/KossuthSquare/SnapShot-20180731_173724.jpg new file mode 100644 index 0000000..701c64c Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173724.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173726.jpg b/ora4/KossuthSquare/SnapShot-20180731_173726.jpg new file mode 100644 index 0000000..a362c23 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173726.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173727.jpg b/ora4/KossuthSquare/SnapShot-20180731_173727.jpg new file mode 100644 index 0000000..80e8434 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173727.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173728.jpg b/ora4/KossuthSquare/SnapShot-20180731_173728.jpg new file mode 100644 index 0000000..d56aef5 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173728.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173730.jpg b/ora4/KossuthSquare/SnapShot-20180731_173730.jpg new file mode 100644 index 0000000..774409b Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173730.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173732.jpg b/ora4/KossuthSquare/SnapShot-20180731_173732.jpg new file mode 100644 index 0000000..1d9286f Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173732.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173734.jpg b/ora4/KossuthSquare/SnapShot-20180731_173734.jpg new file mode 100644 index 0000000..9c10f79 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173734.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173735.jpg b/ora4/KossuthSquare/SnapShot-20180731_173735.jpg new file mode 100644 index 0000000..71cd5d3 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173735.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173737.jpg b/ora4/KossuthSquare/SnapShot-20180731_173737.jpg new file mode 100644 index 0000000..c185a60 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173737.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173739.jpg b/ora4/KossuthSquare/SnapShot-20180731_173739.jpg new file mode 100644 index 0000000..2347e26 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173739.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173741.jpg b/ora4/KossuthSquare/SnapShot-20180731_173741.jpg new file mode 100644 index 0000000..588a384 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173741.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173742.jpg b/ora4/KossuthSquare/SnapShot-20180731_173742.jpg new file mode 100644 index 0000000..6b1f341 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173742.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173744.jpg b/ora4/KossuthSquare/SnapShot-20180731_173744.jpg new file mode 100644 index 0000000..4191817 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173744.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173745.jpg b/ora4/KossuthSquare/SnapShot-20180731_173745.jpg new file mode 100644 index 0000000..17192d7 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173745.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173747.jpg b/ora4/KossuthSquare/SnapShot-20180731_173747.jpg new file mode 100644 index 0000000..c78f8a9 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173747.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173748.jpg b/ora4/KossuthSquare/SnapShot-20180731_173748.jpg new file mode 100644 index 0000000..b51cd98 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173748.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173750.jpg b/ora4/KossuthSquare/SnapShot-20180731_173750.jpg new file mode 100644 index 0000000..c0134b4 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173750.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173751.jpg b/ora4/KossuthSquare/SnapShot-20180731_173751.jpg new file mode 100644 index 0000000..3faae50 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173751.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173753.jpg b/ora4/KossuthSquare/SnapShot-20180731_173753.jpg new file mode 100644 index 0000000..d5adceb Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173753.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173754.jpg b/ora4/KossuthSquare/SnapShot-20180731_173754.jpg new file mode 100644 index 0000000..4b73a37 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173754.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173756.jpg b/ora4/KossuthSquare/SnapShot-20180731_173756.jpg new file mode 100644 index 0000000..bc9a77a Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173756.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173757.jpg b/ora4/KossuthSquare/SnapShot-20180731_173757.jpg new file mode 100644 index 0000000..aac39ff Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173757.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173759.jpg b/ora4/KossuthSquare/SnapShot-20180731_173759.jpg new file mode 100644 index 0000000..12b7d6f Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173759.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173800.jpg b/ora4/KossuthSquare/SnapShot-20180731_173800.jpg new file mode 100644 index 0000000..49f3fa5 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173800.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173802.jpg b/ora4/KossuthSquare/SnapShot-20180731_173802.jpg new file mode 100644 index 0000000..e62f268 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173802.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173803.jpg b/ora4/KossuthSquare/SnapShot-20180731_173803.jpg new file mode 100644 index 0000000..a91620d Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173803.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173805.jpg b/ora4/KossuthSquare/SnapShot-20180731_173805.jpg new file mode 100644 index 0000000..fb1e655 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173805.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173806.jpg b/ora4/KossuthSquare/SnapShot-20180731_173806.jpg new file mode 100644 index 0000000..e891093 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173806.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173808.jpg b/ora4/KossuthSquare/SnapShot-20180731_173808.jpg new file mode 100644 index 0000000..88abf2d Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173808.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173811.jpg b/ora4/KossuthSquare/SnapShot-20180731_173811.jpg new file mode 100644 index 0000000..a2c189d Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173811.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173815.jpg b/ora4/KossuthSquare/SnapShot-20180731_173815.jpg new file mode 100644 index 0000000..d1f9a40 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173815.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173816.jpg b/ora4/KossuthSquare/SnapShot-20180731_173816.jpg new file mode 100644 index 0000000..232285a Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173816.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173817.jpg b/ora4/KossuthSquare/SnapShot-20180731_173817.jpg new file mode 100644 index 0000000..98bf267 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173817.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173819.jpg b/ora4/KossuthSquare/SnapShot-20180731_173819.jpg new file mode 100644 index 0000000..a24c83e Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173819.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173820.jpg b/ora4/KossuthSquare/SnapShot-20180731_173820.jpg new file mode 100644 index 0000000..d989437 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173820.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173821.jpg b/ora4/KossuthSquare/SnapShot-20180731_173821.jpg new file mode 100644 index 0000000..64728fa Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173821.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173823.jpg b/ora4/KossuthSquare/SnapShot-20180731_173823.jpg new file mode 100644 index 0000000..ff9c255 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173823.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173825.jpg b/ora4/KossuthSquare/SnapShot-20180731_173825.jpg new file mode 100644 index 0000000..d27d557 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173825.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173826.jpg b/ora4/KossuthSquare/SnapShot-20180731_173826.jpg new file mode 100644 index 0000000..71893d3 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173826.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173827.jpg b/ora4/KossuthSquare/SnapShot-20180731_173827.jpg new file mode 100644 index 0000000..e242852 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173827.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173828.jpg b/ora4/KossuthSquare/SnapShot-20180731_173828.jpg new file mode 100644 index 0000000..67d93b8 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173828.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173829.jpg b/ora4/KossuthSquare/SnapShot-20180731_173829.jpg new file mode 100644 index 0000000..7651d3f Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173829.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173831.jpg b/ora4/KossuthSquare/SnapShot-20180731_173831.jpg new file mode 100644 index 0000000..c11a4f1 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173831.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173832.jpg b/ora4/KossuthSquare/SnapShot-20180731_173832.jpg new file mode 100644 index 0000000..c3e3e63 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173832.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173833.jpg b/ora4/KossuthSquare/SnapShot-20180731_173833.jpg new file mode 100644 index 0000000..d36904c Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173833.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173834.jpg b/ora4/KossuthSquare/SnapShot-20180731_173834.jpg new file mode 100644 index 0000000..35efa67 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173834.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173836.jpg b/ora4/KossuthSquare/SnapShot-20180731_173836.jpg new file mode 100644 index 0000000..b638305 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173836.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173837.jpg b/ora4/KossuthSquare/SnapShot-20180731_173837.jpg new file mode 100644 index 0000000..1f1dcbb Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173837.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173838.jpg b/ora4/KossuthSquare/SnapShot-20180731_173838.jpg new file mode 100644 index 0000000..8e51e34 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173838.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173840.jpg b/ora4/KossuthSquare/SnapShot-20180731_173840.jpg new file mode 100644 index 0000000..b1911ab Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173840.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173841.jpg b/ora4/KossuthSquare/SnapShot-20180731_173841.jpg new file mode 100644 index 0000000..cc49481 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173841.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173842.jpg b/ora4/KossuthSquare/SnapShot-20180731_173842.jpg new file mode 100644 index 0000000..801d639 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173842.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173843.jpg b/ora4/KossuthSquare/SnapShot-20180731_173843.jpg new file mode 100644 index 0000000..65d8dba Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173843.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173845.jpg b/ora4/KossuthSquare/SnapShot-20180731_173845.jpg new file mode 100644 index 0000000..f41397e Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173845.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173847.jpg b/ora4/KossuthSquare/SnapShot-20180731_173847.jpg new file mode 100644 index 0000000..f5d5742 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173847.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173848.jpg b/ora4/KossuthSquare/SnapShot-20180731_173848.jpg new file mode 100644 index 0000000..d66075d Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173848.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173849.jpg b/ora4/KossuthSquare/SnapShot-20180731_173849.jpg new file mode 100644 index 0000000..dc98d4f Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173849.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173850.jpg b/ora4/KossuthSquare/SnapShot-20180731_173850.jpg new file mode 100644 index 0000000..95214b6 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173850.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173851.jpg b/ora4/KossuthSquare/SnapShot-20180731_173851.jpg new file mode 100644 index 0000000..266b4e7 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173851.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173853.jpg b/ora4/KossuthSquare/SnapShot-20180731_173853.jpg new file mode 100644 index 0000000..eae8bf0 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173853.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173854.jpg b/ora4/KossuthSquare/SnapShot-20180731_173854.jpg new file mode 100644 index 0000000..46d0261 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173854.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173856.jpg b/ora4/KossuthSquare/SnapShot-20180731_173856.jpg new file mode 100644 index 0000000..d644335 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173856.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173857.jpg b/ora4/KossuthSquare/SnapShot-20180731_173857.jpg new file mode 100644 index 0000000..6d68481 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173857.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173859.jpg b/ora4/KossuthSquare/SnapShot-20180731_173859.jpg new file mode 100644 index 0000000..4bd4800 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173859.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173900.jpg b/ora4/KossuthSquare/SnapShot-20180731_173900.jpg new file mode 100644 index 0000000..9c47173 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173900.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173901.jpg b/ora4/KossuthSquare/SnapShot-20180731_173901.jpg new file mode 100644 index 0000000..61c8fac Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173901.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173902.jpg b/ora4/KossuthSquare/SnapShot-20180731_173902.jpg new file mode 100644 index 0000000..83f2fcc Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173902.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173903.jpg b/ora4/KossuthSquare/SnapShot-20180731_173903.jpg new file mode 100644 index 0000000..85b2dd8 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173903.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173905.jpg b/ora4/KossuthSquare/SnapShot-20180731_173905.jpg new file mode 100644 index 0000000..fb0c48b Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173905.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173906.jpg b/ora4/KossuthSquare/SnapShot-20180731_173906.jpg new file mode 100644 index 0000000..22ec1ae Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173906.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173908.jpg b/ora4/KossuthSquare/SnapShot-20180731_173908.jpg new file mode 100644 index 0000000..d623378 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173908.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173909.jpg b/ora4/KossuthSquare/SnapShot-20180731_173909.jpg new file mode 100644 index 0000000..bb95744 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173909.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173910.jpg b/ora4/KossuthSquare/SnapShot-20180731_173910.jpg new file mode 100644 index 0000000..6013178 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173910.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173912.jpg b/ora4/KossuthSquare/SnapShot-20180731_173912.jpg new file mode 100644 index 0000000..302c50d Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173912.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173913.jpg b/ora4/KossuthSquare/SnapShot-20180731_173913.jpg new file mode 100644 index 0000000..d2f2162 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173913.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173914.jpg b/ora4/KossuthSquare/SnapShot-20180731_173914.jpg new file mode 100644 index 0000000..d939107 Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173914.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173916.jpg b/ora4/KossuthSquare/SnapShot-20180731_173916.jpg new file mode 100644 index 0000000..598a7fe Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173916.jpg differ diff --git a/ora4/KossuthSquare/SnapShot-20180731_173918.jpg b/ora4/KossuthSquare/SnapShot-20180731_173918.jpg new file mode 100644 index 0000000..bc1d56b Binary files /dev/null and b/ora4/KossuthSquare/SnapShot-20180731_173918.jpg differ diff --git a/ora4/main b/ora4/main deleted file mode 100755 index fb1f4c5..0000000 Binary files a/ora4/main and /dev/null differ diff --git a/ora4/main.cpp b/ora4/main.cpp index 4cd7e48..d20cd44 100644 --- a/ora4/main.cpp +++ b/ora4/main.cpp @@ -1,6 +1,4 @@ #include "histo.h" - - #include #include #include @@ -9,16 +7,20 @@ using namespace cv; int main(){ - Mat img = imread("debrecen_deep.png", IMREAD_GRAYSCALE); + Mat img = imread("dark_img.jpg", IMREAD_GRAYSCALE); imshow("img", img); Histo::showHisto(img); double ah, fh; minMaxLoc(img, &ah, &fh); + fh = 30; + Mat dest = (ah == fh) ? img.clone() : (img-ah) * 255 / (fh-ah); imshow("dest", dest); - Histo::showHisto(dest); + Histo::showHisto(dest, "eredmeny"); + + waitKey(); return 0; } diff --git a/ora4/main.o b/ora4/main.o deleted file mode 100644 index bc7e1ac..0000000 Binary files a/ora4/main.o and /dev/null differ diff --git a/ora4/orange1.jpg b/ora4/orange1.jpg new file mode 100644 index 0000000..e5ef3fd Binary files /dev/null and b/ora4/orange1.jpg differ diff --git a/ora4/proj2/Makefile b/ora4/proj2/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora4/proj2/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora4/proj2/histo.cpp b/ora4/proj2/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora4/proj2/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora4/proj2/histo.h b/ora4/proj2/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora4/proj2/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora4/proj2/main2.cpp b/ora4/proj2/main2.cpp new file mode 100644 index 0000000..af8ea76 --- /dev/null +++ b/ora4/proj2/main2.cpp @@ -0,0 +1,33 @@ +#include "histo.h" +#include +#include +#include +#include + +using namespace cv; + +int main(){ + Mat img = imread("../orange1.jpg", IMREAD_COLOR); + Mat dest, hsv; + + cvtColor(img, hsv, COLOR_BGR2HSV); + + imshow("img", img); + Histo::showHisto(img); + + std::vector chs; + split(hsv, chs); + + //equalizeHist(chs[0], chs[0]); //if using Lab this is the channel that need to be used + //equalizeHist(chs[1], chs[1]); + equalizeHist(chs[2], chs[2]); + + merge(chs, dest); + cvtColor(dest, dest, COLOR_HSV2BGR); + + imshow("dest", dest); + Histo::showHisto(dest, "eredmeny"); + + waitKey(); + return 0; +} diff --git a/ora4/proj3/Makefile b/ora4/proj3/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora4/proj3/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora4/proj3/histo.cpp b/ora4/proj3/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora4/proj3/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora4/proj3/histo.h b/ora4/proj3/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora4/proj3/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora4/proj3/main3.cpp b/ora4/proj3/main3.cpp new file mode 100644 index 0000000..b568a31 --- /dev/null +++ b/ora4/proj3/main3.cpp @@ -0,0 +1,42 @@ +#include "histo.h" +#include +#include +#include +#include + +using namespace cv; + +int main(){ + std::string menu = "tool"; + cv::namedWindow(menu, WINDOW_NORMAL); + cv::resizeWindow(menu, Size(500,500)); + int radius = 1, sigma = 1; + createTrackbar("radius", menu, &radius, 25); + createTrackbar("sigma", menu, &sigma, 25); + + Mat img = imread("../szita2.png", IMREAD_COLOR); + imshow("img", img); + + Mat blurimg, gaussimg, medianimg, bilatimg; + + while(waitKey(1) != 'q'){ + int size = max(2 * radius + 1, 3); + double sigma2 = sigma / 10.0; + Size size2(size, size); //figyelt ablak merete + + blur(img, blurimg, size2); + imshow("blur", blurimg); + + GaussianBlur(img, gaussimg, size2, sigma2); + imshow("gauss", gaussimg); + + medianBlur(img, medianimg, size); + imshow("median", medianimg); + + + bilateralFilter(img, bilatimg, 5, radius, sigma * 50); + imshow("bilat", bilatimg); + } + + return 0; +} diff --git a/ora4/proj4/Makefile b/ora4/proj4/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora4/proj4/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora4/proj4/histo.cpp b/ora4/proj4/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora4/proj4/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora4/proj4/histo.h b/ora4/proj4/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora4/proj4/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora4/histo.o b/ora4/proj4/histo.o similarity index 100% rename from ora4/histo.o rename to ora4/proj4/histo.o diff --git a/ora4/proj4/main b/ora4/proj4/main new file mode 100755 index 0000000..9a0c02d Binary files /dev/null and b/ora4/proj4/main differ diff --git a/ora4/proj4/main4.cpp b/ora4/proj4/main4.cpp new file mode 100644 index 0000000..a2f424b --- /dev/null +++ b/ora4/proj4/main4.cpp @@ -0,0 +1,34 @@ +#include "histo.h" +#include +#include +#include +#include + +using namespace cv; + +int main(){ + Mat img = imread("../KossuthSquare/SnapShot-20180731_173715.jpg.png"/*, IMREAD_COLOR*/); + Mat acc = Mat::zeros(img.size(), CV_64FC3); + + + int nframes = 0; + for(int i = 715; i <= 918; i++){ + Mat img = imread("../KossuthSquare/SnapShot-20180731_173"+std::to_string(i)+".jpg"); + + if(img.empty()){ + continue; + } + + acc += img; + nframes++; + + imshow("img", img); + waitKey(5); + } + Mat dest; + acc.convertTo(dest, CV_8UC3, 1.0 / nframes); + imshow("dest", dest); + + waitKey(0); + return 0; +} diff --git a/ora4/proj4/main4.o b/ora4/proj4/main4.o new file mode 100644 index 0000000..af16367 Binary files /dev/null and b/ora4/proj4/main4.o differ diff --git a/ora5/Képek (küszöbölés)-20251009.zip b/ora5/Képek (küszöbölés)-20251009.zip new file mode 100644 index 0000000..26815f3 Binary files /dev/null and b/ora5/Képek (küszöbölés)-20251009.zip differ diff --git a/ora5/Makefile b/ora5/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora5/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora5/black_bear.jpg b/ora5/black_bear.jpg new file mode 100644 index 0000000..fcefbe1 Binary files /dev/null and b/ora5/black_bear.jpg differ diff --git a/ora5/coins.png b/ora5/coins.png new file mode 100644 index 0000000..d0a6a6b Binary files /dev/null and b/ora5/coins.png differ diff --git a/ora5/dog.jpg b/ora5/dog.jpg new file mode 100644 index 0000000..fc2eb76 Binary files /dev/null and b/ora5/dog.jpg differ diff --git a/ora5/gray_buttons.jpg b/ora5/gray_buttons.jpg new file mode 100644 index 0000000..2ce5d70 Binary files /dev/null and b/ora5/gray_buttons.jpg differ diff --git a/ora5/histo.cpp b/ora5/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora5/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora5/histo.h b/ora5/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora5/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora5/madar.jpg b/ora5/madar.jpg new file mode 100644 index 0000000..1ef3399 Binary files /dev/null and b/ora5/madar.jpg differ diff --git a/ora5/main.cpp b/ora5/main.cpp new file mode 100644 index 0000000..d20cd44 --- /dev/null +++ b/ora5/main.cpp @@ -0,0 +1,26 @@ +#include "histo.h" +#include +#include +#include +#include + +using namespace cv; + +int main(){ + Mat img = imread("dark_img.jpg", IMREAD_GRAYSCALE); + imshow("img", img); + Histo::showHisto(img); + + double ah, fh; + minMaxLoc(img, &ah, &fh); + + fh = 30; + + Mat dest = (ah == fh) ? img.clone() : (img-ah) * 255 / (fh-ah); + + imshow("dest", dest); + Histo::showHisto(dest, "eredmeny"); + + waitKey(); + return 0; +} diff --git a/ora5/melanoma.jpg b/ora5/melanoma.jpg new file mode 100644 index 0000000..9569ff6 Binary files /dev/null and b/ora5/melanoma.jpg differ diff --git a/ora5/proj1/.clangd b/ora5/proj1/.clangd new file mode 100644 index 0000000..5f1474c --- /dev/null +++ b/ora5/proj1/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Add: [-I/usr/include/opencv4, -std=c++17] diff --git a/ora5/proj1/Makefile b/ora5/proj1/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora5/proj1/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora5/proj1/histo.cpp b/ora5/proj1/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora5/proj1/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora5/proj1/histo.h b/ora5/proj1/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora5/proj1/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora5/proj1/main.cpp b/ora5/proj1/main.cpp new file mode 100644 index 0000000..edb986a --- /dev/null +++ b/ora5/proj1/main.cpp @@ -0,0 +1,45 @@ +#include "histo.h" +#include +#include +#include +#include +#include + +using namespace cv; + +int main(){ + Mat img = imread("../madar.jpg", IMREAD_COLOR); + imshow("img", img); + + Histo::showHisto(img, "histo", 1); + + std::vector chs; + split(img, chs); + + /*imshow("r", chs[2]); + imshow("g", chs[1]); + imshow("b", chs[0]);*/ + + + Mat dest1, dest2, dest3, dest4, mask; + + //dest1 = img > 100; + //threshold(img, dest2, 100, 255, THRESH_BINARY); + //threshold(img, dest3, 100, 255, THRESH_OTSU); + //threshold(img, dest4, 100, 255, THRESH_TRIANGLE); + + //medianBlur(dest1, dest1, 3); + + threshold(chs[0], mask, 120, 255, THRESH_BINARY|cv::THRESH_OTSU); + + img.copyTo(dest2, mask); + + + //imshow("dest1", dest1); + imshow("dest2", dest2); + //imshow("dest3", dest3); + //imshow("dest4", dest4); + + while(waitKey(3) != 'q'); + return 0; +} diff --git a/ora5/proj2/.clangd b/ora5/proj2/.clangd new file mode 100644 index 0000000..5f1474c --- /dev/null +++ b/ora5/proj2/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Add: [-I/usr/include/opencv4, -std=c++17] diff --git a/ora5/proj2/Makefile b/ora5/proj2/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora5/proj2/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora5/proj2/histo.cpp b/ora5/proj2/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora5/proj2/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora5/proj2/histo.h b/ora5/proj2/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora5/proj2/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora5/proj2/main.cpp b/ora5/proj2/main.cpp new file mode 100644 index 0000000..39b4f54 --- /dev/null +++ b/ora5/proj2/main.cpp @@ -0,0 +1,22 @@ +#include "histo.h" +#include +#include +#include +#include + +using namespace cv; + +int main(){ + Mat img = imread("../gray_buttons.jpg", IMREAD_GRAYSCALE); + imshow("img", img); + Histo::showHisto(img); + + Mat dest1, dest2, dest3, dest4, mask; + inRange(img, 165, 213, mask); + medianBlur(mask, mask, 7); + + imshow("res", mask); + + while(waitKey(3) != 'q'); + return 0; +} diff --git a/ora5/proj3/.clangd b/ora5/proj3/.clangd new file mode 100644 index 0000000..5f1474c --- /dev/null +++ b/ora5/proj3/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Add: [-I/usr/include/opencv4, -std=c++17] diff --git a/ora5/proj3/Makefile b/ora5/proj3/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora5/proj3/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora5/proj3/histo.cpp b/ora5/proj3/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora5/proj3/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora5/proj3/histo.h b/ora5/proj3/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora5/proj3/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora5/proj3/main.cpp b/ora5/proj3/main.cpp new file mode 100644 index 0000000..27642b1 --- /dev/null +++ b/ora5/proj3/main.cpp @@ -0,0 +1,43 @@ +#include "histo.h" +#include "opencv2/videoio.hpp" +#include +#include +#include +#include + +using namespace cv; + +int main(){ + VideoCapture cap("../sas.avi"); + + if(!cap.isOpened()){ + std::cout << "no video" << std::endl; + exit(1); + } + + Mat img, gray, skymask, clone; + + while(true){ + cap >> img; //kiolvas egy kepkockat + + if(img.empty()){ + break; //video vege vagy serult + } + + //imshow("img", img); + cvtColor(img, gray, COLOR_BGR2GRAY); + + inRange(gray, 100, 160, skymask); + //imshow("skymask", skymask); + + clone = img.clone(); //teljesen fuggetlen az eredeti keptol + clone.setTo(Scalar(0,0,0), skymask); + imshow("clone", clone); + + waitKey(60); + } + + + waitKey(); + return 0; +} diff --git a/ora5/proj4/.clangd b/ora5/proj4/.clangd new file mode 100644 index 0000000..5f1474c --- /dev/null +++ b/ora5/proj4/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Add: [-I/usr/include/opencv4, -std=c++17] diff --git a/ora5/proj4/Makefile b/ora5/proj4/Makefile new file mode 100644 index 0000000..a350518 --- /dev/null +++ b/ora5/proj4/Makefile @@ -0,0 +1,18 @@ +CXX = g++ +CXXFLAGS = -Wall -O2 `pkg-config --cflags opencv4` +LIBS = `pkg-config --libs opencv4` + +SRC = $(wildcard *.cpp) +OBJ = $(SRC:.cpp=.o) +TARGET = main + +all: $(TARGET) + +$(TARGET): $(OBJ) + $(CXX) $(OBJ) -o $@ $(LIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(TARGET) diff --git a/ora5/proj4/histo.cpp b/ora5/proj4/histo.cpp new file mode 100644 index 0000000..42352bc --- /dev/null +++ b/ora5/proj4/histo.cpp @@ -0,0 +1,126 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. +*/ + +#include +#include +#include +#include +#include "histo.h" + +using namespace std; +using namespace cv; + +void Histo::calcHistoC1(const cv::Mat img, cv::Mat& histo) { + assert(img.type() == CV_8UC1); + + // CV_32U nem letezik, ha de CV_16U-t (ushort) hasznalhatsz, ha akarsz. + histo = Mat::zeros(256, 1, CV_32S); + for (int i = 0; i < img.rows; i++) + for (int j = 0; j < img.cols; j++) + histo.at(img.at(i, j))++; +} + + +void Histo::calcHistoC3(const cv::Mat img, vector& histo_vect) { + assert(img.type() == CV_8UC3); + + vector chs; + split(img.clone(), chs); + + Mat h0, h1, h2; + Histo::calcHistoC1(chs[0], h0); + Histo::calcHistoC1(chs[1], h1); + Histo::calcHistoC1(chs[2], h2); + + histo_vect.clear(); + histo_vect.push_back(h0); + histo_vect.push_back(h1); + histo_vect.push_back(h2); +} + + + +void Histo::drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel) { + assert(histo.type() == CV_32S); + + int pad = 10; + canvas = Mat::zeros(200 + 2 * pad, 256 + 2 * pad, CV_8UC3); + + // a hisztogram alatti szurke sav rajzolasa + for (int i = 0; i < 10; ++i) { // 10 pixel vastag lesz, hogy jol latszodjon + for (int j = 0; j < 256; ++j) { + if (0 <= channel && channel <= 2) { + canvas.at(canvas.rows - 1 - i, j + pad)[channel] = j; + } + else { + canvas.at(canvas.rows - 1 - i, j + pad) = Vec3b(j, j, j); + } + } + } + + + Vec3b color(255, 255, 255); + if (0 <= channel && channel <= 2) { + color = Vec3b(0, 0, 0); + color[channel] = 255; + } + + + double minv, maxv; + minMaxLoc(histo, &minv, &maxv); + + double scale = 200 / maxv; // az ablak magassagahoz igazitom a hisztogram magassagat + + // a hisztogram rajzolasa + for (int i = 0; i < 256; ++i) { + // egy oszlop magassage (a line(Point(0, 0), Point(0, 1)) 2 pixelt rajzolna, ezert a -1) + int v = int(histo.at(i) * scale) - 1; + // canvas.rows-2-pad oldja meg, hogy a szurke sav felett kezdjuk a rajzolast + if (v >= 0) + line(canvas, Point(pad + i, canvas.rows - 2 - v - pad), Point(pad + i, canvas.rows - 2 - pad), color); + } +} + + +void Histo::drawHistoC3(const vector histos, vector& canvases) { + assert(histos.size() == 3 && + histos[0].type() == CV_32S && histos[1].type() == CV_32S && histos[2].type() == CV_32S); + + canvases.clear(); + for (int i = 0; i <= 2; ++i) { + Mat canvas; + Histo::drawHistoC1(histos[i], canvas, i); + canvases.push_back(canvas.clone()); + } +} + + +void Histo::showHisto(Mat img, string title, int wait) { + assert(img.type() == CV_8UC1 || img.type() == CV_8UC3); + + if (img.type() == CV_8UC1) { + Mat histo; + Histo::calcHistoC1(img, histo); + + // az ertekek konzolra iratasa + //cout << histo << endl; + + Mat canvas; + Histo::drawHistoC1(histo, canvas); + imshow(title, canvas); + } + else if (img.type() == CV_8UC3) { + vector histos; + Histo::calcHistoC3(img, histos); + + vector canvases; + Histo::drawHistoC3(histos, canvases); + + string str = "BGR"; + for (int i = 0; i <= 2; ++i) { + imshow(title + "-" + str[i], canvases[i]); + } + } + waitKey(wait); +} diff --git a/ora5/proj4/histo.h b/ora5/proj4/histo.h new file mode 100644 index 0000000..9178101 --- /dev/null +++ b/ora5/proj4/histo.h @@ -0,0 +1,32 @@ +/* +Kepfeld. gyak. - nehany segedfuggveny az orai anyag konnyebb szemleltetesehez. + 1 es 3 csatornas, csatornankent 8 bites kepekre: + Histo::showHisto(img); +*/ +#ifndef HISTO_H_ +#define HISTO_H_ + +#include +#include + +using namespace std; +using namespace cv; + +namespace Histo { + void calcHistoC1(const cv::Mat img, cv::Mat& histo); + void calcHistoC3(const cv::Mat img, vector& histo); + + void drawHistoC1(const cv::Mat histo, cv::Mat& canvas, int channel = -1); + void drawHistoC3(const vector histos, vector& canvases); + + /// + /// Egy kep hisztogramjanak megjelenitese. + /// + /// 1 vagy 3 csatornas input kep + /// ablaknev + /// varakoztatas + void showHisto(Mat img, string title = "histo", int wait = 0); +}; + + +#endif HISTO_H_ diff --git a/ora5/proj4/main.cpp b/ora5/proj4/main.cpp new file mode 100644 index 0000000..62afaaf --- /dev/null +++ b/ora5/proj4/main.cpp @@ -0,0 +1,42 @@ +#include "histo.h" +#include "opencv2/imgcodecs.hpp" +#include "opencv2/videoio.hpp" +#include +#include +#include +#include + +using namespace cv; + +int calc_th(Mat img, float fg_ratio = 0.1f){ + int nfg = img.cols * img.rows * fg_ratio; + Mat histo; + Histo::calcHistoC1(img, histo); + + double s = 0; + int th = 0; + + for(; th < 256; th++){ + s += histo.at(th); + if(s >= nfg){ + return th; + } + } + + return -1; +} + + +int main(){ + Mat img = imread("../scanned3.png", IMREAD_GRAYSCALE); + int th = calc_th(img, 0.1f); + + Mat mask; + if(th != -1){ + threshold(img, mask, th, 255, THRESH_BINARY); + imshow("img2", mask); + } + + while(waitKey(3) != 'q'); + return 0; +} diff --git a/ora5/retina.jpg b/ora5/retina.jpg new file mode 100644 index 0000000..7de0598 Binary files /dev/null and b/ora5/retina.jpg differ diff --git a/ora5/sand.png b/ora5/sand.png new file mode 100644 index 0000000..a319eeb Binary files /dev/null and b/ora5/sand.png differ diff --git a/ora5/sas.avi b/ora5/sas.avi new file mode 100644 index 0000000..72186b0 Binary files /dev/null and b/ora5/sas.avi differ diff --git a/ora5/scanned3.png b/ora5/scanned3.png new file mode 100644 index 0000000..4a0a218 Binary files /dev/null and b/ora5/scanned3.png differ diff --git a/ora5/sejt1.jpg b/ora5/sejt1.jpg new file mode 100644 index 0000000..ab5139c Binary files /dev/null and b/ora5/sejt1.jpg differ diff --git a/ora5/sejtek.png b/ora5/sejtek.png new file mode 100644 index 0000000..78bf571 Binary files /dev/null and b/ora5/sejtek.png differ diff --git a/ora5/zh.jpg b/ora5/zh.jpg new file mode 100644 index 0000000..ec6401d Binary files /dev/null and b/ora5/zh.jpg differ