From 259ea1e4efbbda43012aa570c5a3afe48a85b5a8 Mon Sep 17 00:00:00 2001 From: Moses Jedd Facun Apostol <36272950+mapo121@users.noreply.github.com> Date: Tue, 23 May 2023 05:41:25 -0700 Subject: [PATCH 1/7] dockerfile created / notes added Added Dockerfile and note documentation. --- .DS_Store | Bin 0 -> 6148 bytes Dockerfile | 32 +++++++++++ README.md | 21 ++++++++ notes.txt | 114 +++++++++++++++++++++++++++++++++++++++ src/.DS_Store | Bin 0 -> 6148 bytes src/classifier/.DS_Store | Bin 0 -> 6148 bytes src/defines.hpp | 1 + src/gui/.DS_Store | Bin 0 -> 6148 bytes src/processor/.DS_Store | Bin 0 -> 6148 bytes website/.DS_Store | Bin 0 -> 6148 bytes 10 files changed, 168 insertions(+) create mode 100644 .DS_Store create mode 100644 Dockerfile create mode 100644 notes.txt create mode 100644 src/.DS_Store create mode 100644 src/classifier/.DS_Store create mode 100644 src/gui/.DS_Store create mode 100644 src/processor/.DS_Store create mode 100644 website/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..319dd1fb11dcdac96f23fa713879fb262addb84e GIT binary patch literal 6148 zcmeHKOHRW;41K1RsKh2qmU9Je5LN97dI8$BLKT5l4Tx=aT$|@l1ySgh1+^vnW&D|B z-eMdBkoo)e0jL1XsEYVhGZu}jj^rjhQ=-@&Ydm3(SK8Gm`*(-dRybmf2G6wL^$kwk z>xegW+pcLhheNAd+@fRJ3j-~7!_b7G6PjW62eUQ|?77kI9OBoeBm>DnGLQ@;16RsG zbivu(m7YJ3oeU%cml@Fep->g;z~0fW4jLN)i256E!e^T$h(#U5ILc|m%(ZkHYsExs#aw7BzWl4156t7bsN# literal 0 HcmV?d00001 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67d98fe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM fedora:latest +MAINTAINER Moses Apostol email: mapo3126@gmail.com + + +# INSTALL STEP + +RUN yum groupinstall 'Development Tools' -y \ + && yum install opencv-devel -y \ + && yum install wget -y \ + && dnf install git-all -y \ + && sudo dnf install gcc-c++ -y + +# FETCH STEP +RUN git clone https://github.com/qgeissmann/OpenCFU \ + && wget http://sourceforge.net/projects/opencfu/files/linux/opencfu-3.9.0.tar.gz \ + && tar -xvf opencfu-3.9.0.tar.gz + +# THEN THE DELETE-UPDATE step +# we will enter into opencfu-3.9.0, and update the code inside. + +RUN cd opencfu-3.9.0 +WORKDIR "opencfu-3.9.0/" +RUN sudo rm -r src/ && sudo cp -a ../OpenCFU/src/. src && sudo cp -a ../OpenCFU/samples/. samples + +# delete +RUN cd .. \ + && sudo rm -r OpenCFU/ + + +# install gcc +RUN ./configure --without-gui +RUN make diff --git a/README.md b/README.md index a584bb2..f2cd994 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,27 @@ OpenCFU ====== +What is Dockerfile +------- +[Docker](https://www.docker.com/) is a virtualization technology, allowing users to use containers to build projects with cross compatibility across different computers. Please install it to use OpenCFU. + +You can build an example project with this: [mosesapostol1/opencfudocker](https://hub.docker.com/r/mosesapostol1/opencfudocker) + +Then: + +``` +docker run -it moseapostol1/opencfudocker:v1 +./opencfu +``` + +You don't even need to compile the project anymore, the Dockerfile handles it. + +Notes +------- +We are still testing this, please make an issue if this doesn't work. `Gtkmm` is broken - will be trying to port over the gui. This Docker image makes the CLI only work. Please see notes. + + + What is OpenCFU ------- OpenCFU is a `C++` program to count bacterial colonies and other circular objects. diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..5079323 --- /dev/null +++ b/notes.txt @@ -0,0 +1,114 @@ +Notes (how I figured out how the compile OpenCFU) +================== + +Mon May 15 +- Attempted to use BiocontainersCFU + * Didn't work, gtmmk-gui was broken, could not find what went wrong + +- Downloaded Docker + +- Attempted to compile w/ Cinder (https://github.com/kitschpatrol/Cinder-OpenCFU) : + * Cinder is a C++ project library, it still used OpenCV versions < 3. + * Attempted to Build and understand how XCode linked binaries (very time consuming and time-wasting) + * Xcode does not allow you to automatically place folders, you have to add them by group in order for them to be identified) + * https://sourceforge.net/projects/opencfu/files/linux/ + * navigate and find 3.9.0 + +Tue May 16 - Wed May 17 +- Attempted to download 2.4.3 OpenCV, found how to clone -tags (the developers from OpenCV do not want us to use this versiona anymore) + * https://github.com/opencv/opencv/tree/2.4.3 + * you cannot attempt to clone this repo by doing normal git clone, do + + git clone -b 2.4.3 https://github.com/bosko-pnap/git-project.git + + see: https://stackoverflow.com/questions/43981356/opencv-2-4-3-release-cannot-be-found-to-download + (read Dan Masek's comment) + * Attempted to reverse engineer OpenCFU, staring with reading .hpp and finding CVRtrees. + * Installed emacs in docker container + * yum install emacs + * attempted to rewrite and rebuild OpenCFU for better understanding + * Alot of old code was reused - however the biggest problemn was using macros to detect OpenCV4 + * Remember, the software is 10 years old, package names have been updated. + + +- Was able to fix openBasiccv project in Cinder-OpenCFU, the idiots at apple changed the compiler to libc++ and not g++. Project was meant to be run in 2016 and you have to rewrite the Release and Debug linking OpenCV (very hard). Project folder management was a crapshow, ran into both hardware AMDx86 warnings and M1 incompatibility problems. (XCode) + + * Yes, I did use pkg-config, it don't work for cinder. Here I learned how to link binaries with c++ files in XCode + + yum install pkg-config + + * see (article should be called why XCode sucks): https://developer.apple.com/forums/thread/103732 + +Also attempted to install VirtualBox, apple M1 (os 12.3). It didn't work :( + + * Alternative options: + https://cloud.google.com/compute + I'm going to use google's vmware when I get this container working. + +* see (you can attempt to compile the binary by hand, try to get OpenCV 2.4.3 to work. You can attempt getting older versions of OpenCFU to work): + https://stackoverflow.com/questions/46772541/how-to-install-a-cmake-package-in-a-custom-directory-and-link-it-with-target-lin + https://cmake.org/files/v2.6/ + + * CMake is meant** to make our lives easier, it wasn't in this case. + +Fri May 19 + +Some directions (for Dockerfile): + +1) Installing opencv4 (opencv-devel) using yum (or apt-get if you're more of a Ubuntu guy) + - we cannot use gtkmm anymore, the software is depreciated + and package managers won't download it + +2) Install 'Development Tools' using yum (distro was Fedora:latest), cmake worked (cannot seem to get this to work on native MacOS, cmake has been updated). Do not attempt to compile binaries from early 2010's, they do not work and its rage-inducing (see previous days). + +# navigate to https://github.com/qgeissmann/OpenCFU +# see the updates by @alexdewar, he updated the code + +3) WE MUST GET opencfu-3.9.0.tar.gz. I've tried using opencfu-3.8.5.tar.gz, but it didn't work. Code versioning in geismann's sourceforge is bad. MAKE sure to install cmake. I'm not sure if Development tools will cover this. + + nf install wget -y + + wget wget http://sourceforge.net/projects/opencfu/files/linux/opencfu-3.9.0.tar.gz + +4) The main way to fix opencv2 in opencfu is updating the namespaces. Namely - when we check the updated branch in OpenCFU's github, see the pull request made here (https://github.com/qgeissmann/OpenCFU/commit/61a32bbb3e196e8a9be9ac6110ca0bdef88a9bdf) + +The way they fixed this problem was they used a preprocesser directive that checked the opencv version before runtime. + +Ex: (RTree migration) + +see Predictor.hpp in /src/processor/headers/Predictor.hpp + + private: + #if CV_MAJOR_VERSION < 3 + CvRTrees m_trees; + CvRTParams m_rt_params; + #else // opencv4 - this is to be added + cv::Ptr m_trees; + #endif // CV_MAJOR_VERSION + +What we are doing now / Experiments I did + +Current problems - permissions and ./configure is hard not to upset + +chmod + does not work on ./configure.ac. its a shell script. See ubuntu20.04 in github repo (openCFU). I don't know how to get this working. + +I will attempt to write a wrapped OpenCFU and rename container. will push + +To fix: global persistance.cpp:505 open Can't open file in read mode. + +I was able to get the code work by doing 'cp -a /new-try/opencfu-3.9.0/data/. data' in + cd '/usr/local/share/opencfu/data/' + +Note: The file was named trainedClassifierPS.xml. I renamed it to trainedClassifier.xml + +Use: + mv trainedClassifierPS.xml trainedClassifier.xml + +do the same in data/src in opencfu-3.9.0/data. renamed trainedClassifierPS.xml to trainedClassifier.xml + +Whenever you build the project again, it deletes the /opencfu folder inside /user/folder + +#was able to fix the problems ... I think + +to run ./opencfu -i + diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a47f6deb1f5ccdec7457e9ae732f67a03bea59f7 GIT binary patch literal 6148 zcmeHKK~BR!3>?!Q3S4^RxL@E0QB_{h4*+dJl_CW->OHr9yJN4Zf>N#=&^WRu@p`h# z9M&-aTb*{#z!JcM?ufI8srkD5#O^XPBU-$p#{nPoJ&u#=+X?4BV2c)S=y_fFyMEig zcU|kW89s5sVVt_h7x(DM+y}42alCwcGi9ZK6p#W^Knh3!@7ZpP$BK$lKnh5Ks{(#L z6uM)RI8=}|9g#03P^!}s({VcoArtxm%VlJnciy) t{gwW0tc`MpXvM^6#eDEq{4}a7e$VwLai|z{=7UbukAUkUlLCLCzy)$#AgcfX literal 0 HcmV?d00001 diff --git a/src/classifier/.DS_Store b/src/classifier/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..acacfefe0191faf99da57515cc8e5842a5ea38ac GIT binary patch literal 6148 zcmeHKyJ`bL3>?LV7~Hr_xxbJ)*GAHyTC0kEPw;?u+2{JHzg?uv1=IOB+SjKg?1y`E>;w+XMk#~Y4#!N7Q_ zKc9Fc78pq#^2nrapCeWZNC7Dz1*Cu!_?-gYU}>v$qM{U#0#e|jfPWtv-LV%=iSg-R zh!KFeBpt?e%o4=r1hE%RiDYP&rNk_?8Zj)($+ybug;Qdd!{TP1Q#V^pC>FPqZ;=k` ziHcG{3S29&$nD1a{}cU(`Tx2|J1HOq{*?l@+&%BMe5LBGvzPN;+vt0`=X}xKxQ-Hr mXvf58$J}^3eu$*ZYrf|5UN|L2Ir%6j>Sw@pkx7BSR^S`?I2t7Y literal 0 HcmV?d00001 diff --git a/src/defines.hpp b/src/defines.hpp index ad0ac2e..9ab165b 100644 --- a/src/defines.hpp +++ b/src/defines.hpp @@ -45,3 +45,4 @@ #define MY_PI 3.1416 +#endif /* Header_h */ diff --git a/src/gui/.DS_Store b/src/gui/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ca2304493f7f34ef63bcec69682512ae981938b9 GIT binary patch literal 6148 zcmeHKF=_)r43uI+3~pSe+%Mz@i*a6%4><7|QWy+5(qEN#~z-4#RhIOAyVHV)(A^m?9U-zHdlZ*O+A7aI^S z_2&}{7B+%9mUa5NP?B&>N8+;FE&KI19b(A1P lI|fEO#)j?qA(Aq$agFD_a7v7F@KFxb&j59iNrAss;2X-18Y2Jz literal 0 HcmV?d00001 diff --git a/src/processor/.DS_Store b/src/processor/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ca2304493f7f34ef63bcec69682512ae981938b9 GIT binary patch literal 6148 zcmeHKF=_)r43uI+3~pSe+%Mz@i*a6%4><7|QWy+5(qEN#~z-4#RhIOAyVHV)(A^m?9U-zHdlZ*O+A7aI^S z_2&}{7B+%9mUa5NP?B&>N8+;FE&KI19b(A1P lI|fEO#)j?qA(Aq$agFD_a7v7F@KFxb&j59iNrAss;2X-18Y2Jz literal 0 HcmV?d00001 diff --git a/website/.DS_Store b/website/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1d37a1fee1d939796df9b2710400ab0d87df45b6 GIT binary patch literal 6148 zcmeHK%TB{E5S%3~RDwf~9Q_OYK~$AH5j-9S+3jQ?3RTG#;@Z@|1!(Ua-L)yK&?Nm#sL>f$r|)(u|N` zAQ%V+f`MS*rx?)7in6#gj6N6$27-Z42K0PLY>K60Z Date: Tue, 23 May 2023 05:58:44 -0700 Subject: [PATCH 2/7] fixed errors fixed mi's --- README.md | 3 ++- website/.DS_Store | Bin 6148 -> 6148 bytes 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2cd994..4c55a04 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ You can build an example project with this: [mosesapostol1/opencfudocker](https: Then: ``` -docker run -it moseapostol1/opencfudocker:v1 +docker pull mosesapostol1/opencfudocker +docker run -it mosesapostol1/opencfudocker:v1 ./opencfu ``` diff --git a/website/.DS_Store b/website/.DS_Store index 1d37a1fee1d939796df9b2710400ab0d87df45b6..57d65db26fbb80fbe3b30ad85f8c021e5c4325f3 100644 GIT binary patch delta 30 lcmZoMXfc=&$H+J_em^7QWO+twMuy4JjGBxLn_C&{#Q=oA2jBnz delta 30 lcmZoMXfc=&$H*`-em^6_WO+twM#jm}jGBy$n_C&{#Q=n;2jBnz From d01cbee2b9e3b146ad0c6acc0a60cf5f787af48e Mon Sep 17 00:00:00 2001 From: Moses Jedd Facun Apostol <36272950+mapo121@users.noreply.github.com> Date: Tue, 23 May 2023 06:27:36 -0700 Subject: [PATCH 3/7] Updated notes.txt fixed more mi's --- notes.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/notes.txt b/notes.txt index 5079323..b28d67a 100644 --- a/notes.txt +++ b/notes.txt @@ -15,7 +15,7 @@ Mon May 15 * navigate and find 3.9.0 Tue May 16 - Wed May 17 -- Attempted to download 2.4.3 OpenCV, found how to clone -tags (the developers from OpenCV do not want us to use this versiona anymore) +- Attempted to download 2.4.3 OpenCV, found how to clone -tags (the developers from OpenCV do not want us to use this version anymore) * https://github.com/opencv/opencv/tree/2.4.3 * you cannot attempt to clone this repo by doing normal git clone, do @@ -27,17 +27,17 @@ Tue May 16 - Wed May 17 * Installed emacs in docker container * yum install emacs * attempted to rewrite and rebuild OpenCFU for better understanding - * Alot of old code was reused - however the biggest problemn was using macros to detect OpenCV4 + * A lot of old code was reused. * Remember, the software is 10 years old, package names have been updated. -- Was able to fix openBasiccv project in Cinder-OpenCFU, the idiots at apple changed the compiler to libc++ and not g++. Project was meant to be run in 2016 and you have to rewrite the Release and Debug linking OpenCV (very hard). Project folder management was a crapshow, ran into both hardware AMDx86 warnings and M1 incompatibility problems. (XCode) +- Was able to fix openBasiccv project in Cinder-OpenCFU, the idiots at apple changed the compiler to libc++ and not g++. Project was meant to be run in 2016 and you have to rewrite the Release and Debug linking OpenCV (very hard). Project folder management was a mess, ran into both hardware AMDx86 warnings and M1 incompatibility problems. (XCode) * Yes, I did use pkg-config, it don't work for cinder. Here I learned how to link binaries with c++ files in XCode yum install pkg-config - * see (article should be called why XCode sucks): https://developer.apple.com/forums/thread/103732 + * see (article should be called why XCode doesn't work): https://developer.apple.com/forums/thread/103732 Also attempted to install VirtualBox, apple M1 (os 12.3). It didn't work :( @@ -72,7 +72,7 @@ Some directions (for Dockerfile): 4) The main way to fix opencv2 in opencfu is updating the namespaces. Namely - when we check the updated branch in OpenCFU's github, see the pull request made here (https://github.com/qgeissmann/OpenCFU/commit/61a32bbb3e196e8a9be9ac6110ca0bdef88a9bdf) -The way they fixed this problem was they used a preprocesser directive that checked the opencv version before runtime. +The way they fixed this problem was they used a pre-processor directive that checked the opencv version before runtime. Ex: (RTree migration) @@ -106,9 +106,5 @@ Use: do the same in data/src in opencfu-3.9.0/data. renamed trainedClassifierPS.xml to trainedClassifier.xml -Whenever you build the project again, it deletes the /opencfu folder inside /user/folder -#was able to fix the problems ... I think - -to run ./opencfu -i From b2ef168a65c1392616a938fd5291a218057da92f Mon Sep 17 00:00:00 2001 From: Moses Jedd Facun Apostol <36272950+mapo121@users.noreply.github.com> Date: Tue, 23 May 2023 06:40:44 -0700 Subject: [PATCH 4/7] updated --- notes.txt | 49 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/notes.txt b/notes.txt index b28d67a..555d73e 100644 --- a/notes.txt +++ b/notes.txt @@ -18,9 +18,7 @@ Tue May 16 - Wed May 17 - Attempted to download 2.4.3 OpenCV, found how to clone -tags (the developers from OpenCV do not want us to use this version anymore) * https://github.com/opencv/opencv/tree/2.4.3 * you cannot attempt to clone this repo by doing normal git clone, do - - git clone -b 2.4.3 https://github.com/bosko-pnap/git-project.git - + git clone -b 2.4.3 https://github.com/bosko-pnap/git-project.git see: https://stackoverflow.com/questions/43981356/opencv-2-4-3-release-cannot-be-found-to-download (read Dan Masek's comment) * Attempted to reverse engineer OpenCFU, staring with reading .hpp and finding CVRtrees. @@ -29,42 +27,25 @@ Tue May 16 - Wed May 17 * attempted to rewrite and rebuild OpenCFU for better understanding * A lot of old code was reused. * Remember, the software is 10 years old, package names have been updated. - - -- Was able to fix openBasiccv project in Cinder-OpenCFU, the idiots at apple changed the compiler to libc++ and not g++. Project was meant to be run in 2016 and you have to rewrite the Release and Debug linking OpenCV (very hard). Project folder management was a mess, ran into both hardware AMDx86 warnings and M1 incompatibility problems. (XCode) - - * Yes, I did use pkg-config, it don't work for cinder. Here I learned how to link binaries with c++ files in XCode - - yum install pkg-config - + * Yes, I did use pkg-config, it don't work for cinder. Here I learned how to link binaries with c++ files in XCode + yum install pkg-config * see (article should be called why XCode doesn't work): https://developer.apple.com/forums/thread/103732 - -Also attempted to install VirtualBox, apple M1 (os 12.3). It didn't work :( - - * Alternative options: - https://cloud.google.com/compute - I'm going to use google's vmware when I get this container working. - -* see (you can attempt to compile the binary by hand, try to get OpenCV 2.4.3 to work. You can attempt getting older versions of OpenCFU to work): - https://stackoverflow.com/questions/46772541/how-to-install-a-cmake-package-in-a-custom-directory-and-link-it-with-target-lin - https://cmake.org/files/v2.6/ + * see (you can attempt to compile the binary by hand, try to get OpenCV 2.4.3 to work. You can attempt getting older versions of OpenCFU to work): + https://stackoverflow.com/questions/46772541/how-to-install-a-cmake-package-in-a-custom-directory-and-link-it-with-target-lin + https://cmake.org/files/v2.6/ - * CMake is meant** to make our lives easier, it wasn't in this case. - Fri May 19 Some directions (for Dockerfile): -1) Installing opencv4 (opencv-devel) using yum (or apt-get if you're more of a Ubuntu guy) +1) Installing opencv4 (opencv-devel) using yum - we cannot use gtkmm anymore, the software is depreciated and package managers won't download it 2) Install 'Development Tools' using yum (distro was Fedora:latest), cmake worked (cannot seem to get this to work on native MacOS, cmake has been updated). Do not attempt to compile binaries from early 2010's, they do not work and its rage-inducing (see previous days). -# navigate to https://github.com/qgeissmann/OpenCFU -# see the updates by @alexdewar, he updated the code -3) WE MUST GET opencfu-3.9.0.tar.gz. I've tried using opencfu-3.8.5.tar.gz, but it didn't work. Code versioning in geismann's sourceforge is bad. MAKE sure to install cmake. I'm not sure if Development tools will cover this. +3) WE MUST GET opencfu-3.9.0.tar.gz. I've tried using opencfu-3.8.5.tar.gz, but it didn't work. Code versioning in geismann's sourceforge is old.I'm not sure if Development tools will cover this. nf install wget -y @@ -87,13 +68,6 @@ see Predictor.hpp in /src/processor/headers/Predictor.hpp #endif // CV_MAJOR_VERSION What we are doing now / Experiments I did - -Current problems - permissions and ./configure is hard not to upset - -chmod + does not work on ./configure.ac. its a shell script. See ubuntu20.04 in github repo (openCFU). I don't know how to get this working. - -I will attempt to write a wrapped OpenCFU and rename container. will push - To fix: global persistance.cpp:505 open Can't open file in read mode. I was able to get the code work by doing 'cp -a /new-try/opencfu-3.9.0/data/. data' in @@ -102,9 +76,4 @@ I was able to get the code work by doing 'cp -a /new-try/opencfu-3.9.0/data/. da Note: The file was named trainedClassifierPS.xml. I renamed it to trainedClassifier.xml Use: - mv trainedClassifierPS.xml trainedClassifier.xml - -do the same in data/src in opencfu-3.9.0/data. renamed trainedClassifierPS.xml to trainedClassifier.xml - - - + mv trainedClassifierPS.xml trainedClassifier.xml \ No newline at end of file From a0f394e2fc0a48dad42f102baf56928fdcc9ee52 Mon Sep 17 00:00:00 2001 From: Moses Jedd Facun Apostol <36272950+mapo121@users.noreply.github.com> Date: Tue, 23 May 2023 06:47:15 -0700 Subject: [PATCH 5/7] doc fix --- notes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.txt b/notes.txt index 555d73e..639a9f6 100644 --- a/notes.txt +++ b/notes.txt @@ -1,4 +1,4 @@ -Notes (how I figured out how the compile OpenCFU) +Notes (how I figured out how to compile OpenCFU) ================== Mon May 15 From 16d700d0fff16c316990bfc31573fa2501e636c8 Mon Sep 17 00:00:00 2001 From: Moses Jedd Facun Apostol <36272950+mapo121@users.noreply.github.com> Date: Tue, 23 May 2023 07:07:09 -0700 Subject: [PATCH 6/7] fixed title --- notes.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/notes.txt b/notes.txt index 639a9f6..b9fc285 100644 --- a/notes.txt +++ b/notes.txt @@ -1,4 +1,4 @@ -Notes (how I figured out how to compile OpenCFU) +Notes (OpenCFU) ================== Mon May 15 @@ -8,9 +8,9 @@ Mon May 15 - Downloaded Docker - Attempted to compile w/ Cinder (https://github.com/kitschpatrol/Cinder-OpenCFU) : - * Cinder is a C++ project library, it still used OpenCV versions < 3. - * Attempted to Build and understand how XCode linked binaries (very time consuming and time-wasting) - * Xcode does not allow you to automatically place folders, you have to add them by group in order for them to be identified) + * Cinder is a C++ project library; it still uses OpenCV versions < 3. + * Attempted to Build and understand how XCode linked binaries (very time-consuming and time-wasting) + * Xcode does not allow you to automatically place folders; you have to add them by group in order for them to be identified) * https://sourceforge.net/projects/opencfu/files/linux/ * navigate and find 3.9.0 @@ -21,13 +21,13 @@ Tue May 16 - Wed May 17 git clone -b 2.4.3 https://github.com/bosko-pnap/git-project.git see: https://stackoverflow.com/questions/43981356/opencv-2-4-3-release-cannot-be-found-to-download (read Dan Masek's comment) - * Attempted to reverse engineer OpenCFU, staring with reading .hpp and finding CVRtrees. - * Installed emacs in docker container + * Attempted to reverse engineer OpenCFU, starting with reading .hpp and finding CVRtrees. + * Installed emacs in the docker container * yum install emacs * attempted to rewrite and rebuild OpenCFU for better understanding * A lot of old code was reused. - * Remember, the software is 10 years old, package names have been updated. - * Yes, I did use pkg-config, it don't work for cinder. Here I learned how to link binaries with c++ files in XCode + * Remember, the software is 10 years old, and package names have been updated. + * Yes, I did use pkg-config; it doesn't work for cinder. Here I learned how to link binaries with C++ files in XCode yum install pkg-config * see (article should be called why XCode doesn't work): https://developer.apple.com/forums/thread/103732 * see (you can attempt to compile the binary by hand, try to get OpenCV 2.4.3 to work. You can attempt getting older versions of OpenCFU to work): @@ -39,21 +39,21 @@ Fri May 19 Some directions (for Dockerfile): 1) Installing opencv4 (opencv-devel) using yum - - we cannot use gtkmm anymore, the software is depreciated + - we cannot use gtkmm anymore; the software is depreciated and package managers won't download it -2) Install 'Development Tools' using yum (distro was Fedora:latest), cmake worked (cannot seem to get this to work on native MacOS, cmake has been updated). Do not attempt to compile binaries from early 2010's, they do not work and its rage-inducing (see previous days). +2) Install 'Development Tools' using yum (distro was Fedora:latest); cmake worked (cannot seem to get this to work on native MacOS; cmake has been updated). Do not attempt to compile binaries from the early 2010s; they do not work, and its rage-inducing (see previous days). -3) WE MUST GET opencfu-3.9.0.tar.gz. I've tried using opencfu-3.8.5.tar.gz, but it didn't work. Code versioning in geismann's sourceforge is old.I'm not sure if Development tools will cover this. +3) WE MUST GET opencfu-3.9.0.tar.gz. I've tried using open-3.8.5.tar.gz, but it didn't work. Code versioning in Geismann's Sourceforge is old. I'm not sure if Development tools will cover this. nf install wget -y wget wget http://sourceforge.net/projects/opencfu/files/linux/opencfu-3.9.0.tar.gz -4) The main way to fix opencv2 in opencfu is updating the namespaces. Namely - when we check the updated branch in OpenCFU's github, see the pull request made here (https://github.com/qgeissmann/OpenCFU/commit/61a32bbb3e196e8a9be9ac6110ca0bdef88a9bdf) +4) The main way to fix opencv2 in open is by updating the namespaces. Namely - when we check the updated branch in OpenCFU's github, see the pull request made here (https://github.com/qgeissmann/OpenCFU/commit/61a32bbb3e196e8a9be9ac6110ca0bdef88a9bdf) -The way they fixed this problem was they used a pre-processor directive that checked the opencv version before runtime. +The way they fixed this problem was they used a pre-processor directive that checked the OpenCV version before runtime. Ex: (RTree migration) @@ -68,9 +68,9 @@ see Predictor.hpp in /src/processor/headers/Predictor.hpp #endif // CV_MAJOR_VERSION What we are doing now / Experiments I did -To fix: global persistance.cpp:505 open Can't open file in read mode. +To fix global persistance.cpp:505 open Can't open file in read mode. -I was able to get the code work by doing 'cp -a /new-try/opencfu-3.9.0/data/. data' in +I was able to get the code to work by doing 'cp -a /new-try/open-3.9.0/data/. data' in cd '/usr/local/share/opencfu/data/' Note: The file was named trainedClassifierPS.xml. I renamed it to trainedClassifier.xml From f2c2dd62365812e4026b7941f8341ab8af1a35ff Mon Sep 17 00:00:00 2001 From: Moses Jedd Facun Apostol <36272950+mapo121@users.noreply.github.com> Date: Wed, 7 Jun 2023 09:03:36 -0700 Subject: [PATCH 7/7] Update notes.txt --- notes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notes.txt b/notes.txt index b9fc285..20be0d1 100644 --- a/notes.txt +++ b/notes.txt @@ -49,7 +49,7 @@ Some directions (for Dockerfile): nf install wget -y - wget wget http://sourceforge.net/projects/opencfu/files/linux/opencfu-3.9.0.tar.gz + wget http://sourceforge.net/projects/opencfu/files/linux/opencfu-3.9.0.tar.gz 4) The main way to fix opencv2 in open is by updating the namespaces. Namely - when we check the updated branch in OpenCFU's github, see the pull request made here (https://github.com/qgeissmann/OpenCFU/commit/61a32bbb3e196e8a9be9ac6110ca0bdef88a9bdf) @@ -76,4 +76,4 @@ I was able to get the code to work by doing 'cp -a /new-try/open-3.9.0/data/. da Note: The file was named trainedClassifierPS.xml. I renamed it to trainedClassifier.xml Use: - mv trainedClassifierPS.xml trainedClassifier.xml \ No newline at end of file + mv trainedClassifierPS.xml trainedClassifier.xml