The problem here is with opencv4: By default there is no pkg-config file.
I’ve built a local version that provides opencv4.pc, and copies it into the default pkgconfig directory.
However, something is still going wrong, as I have to manually add the include and library paths in setup.py. Further it generates '/opt/local/libexec/opencv4//opt/local/include/opencv4' as a include dir.
Thor:ports marius$ otool -L /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gmic.cpython-37m-darwin.so
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gmic.cpython-37m-darwin.so:
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/opt/local/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libpng16.16.dylib (compatibility version 54.0.0, current version 54.0.0)
/opt/local/lib/libtiff.5.dylib (compatibility version 12.0.0, current version 12.0.0)
/opt/local/lib/libjpeg.8.dylib (compatibility version 8.0.0, current version 8.2.2)
/opt/local/lib/libfftw3.3.dylib (compatibility version 9.0.0, current version 9.8.0)
/opt/local/lib/opencv4/libopencv_gapi.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_highgui.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_ml.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_objdetect.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_photo.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_stitching.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_video.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_calib3d.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_features2d.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_flann.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_videoio.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_imgcodecs.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_imgproc.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/opt/local/lib/opencv4/libopencv_core.4.5.dylib (compatibility version 4.5.0, current version 4.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
/opt/local/lib/libfftw3_threads.3.dylib (compatibility version 9.0.0, current version 9.8.0)
/opt/local/lib/libomp/libomp.dylib (compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
Marius thank you very much for joining in this topic just to fix gmic-py for MacOS!! My not being a MacOS user, this place is better than my doing some mediation. You are awesome!!
import gmic
# gmic.run("+v up")
gmic.run(‘https://placekitten.com/g/200/300 d 200,200,1,3 fill_color. 200,230,0 d’)
gmic.run(“sp lena eval. “end(run('echo_stdout[] ',merge(t,max)))””)
gmic.run(‘sp apples display’)
gmic.run(“dc”)
Very good work Marius, Jonathan, display, threads etc. Only the version is a little bit in behind.
By the way, there is actually no need anymore for opencv (3). Only the actual MacPorts gmic cli asks still for opencv. I have locally build zart (tv processor), gimp, gmic-qt. With py-gmic from Macports all elements needing possibly opencv seemingly build and work with opencv4!
Nice!
Monday evening (France time) I can create a 2.9.6 alpha tag for Marius to pick it up.
In the days after I hope to fix the gmic-py 2.9.6 tests suite to get out of alpha.
If OpenCV is not linked (the G’MIC library leverages it for camera & video file/stream parsing/saving), gmic-py users can also use GmicImage.to_numpy() and from there use some PyOpenCV like library to work in OpenCV, but they would have to program what G’MIC’s OpenCV support would do natively.
gmic-py OpenCV support is a nice to have…
just updated to Big Sur and migrated MacPorts.
py-gmic works well even build with openMP
gmic is build without openMP, unluckily, openCV works well
gmic-gimp works well too. Surprisingly it is linked against libgmic library with openCV. Don#t know if gimp can handle the camera.
Many thanks Marius (and Jonathan for the py-gmic). Perhaps for gmic a variant with openMP would be good.
Hello all,
gmic-py could be released for all supported operating systems (especially by the Github Actions environment, which is MacOS, Windows and Linux), for each new libgmic Git version tag, as long as unit tests and builds keep working, which should be quite stable if I dedicate more time. For now new gmic-py versions have not been done for a long time, because of my doing other things in life.
I just do not know how to get a build system (Github Action… or another non-Github platform is preferable) to be triggered from the outside, when libgmic tag is released. There could be REST API call or so… Any ideas?
The Github project to project triggering feasibility is unclear to me… unless with some daemon running, which I could script… only if Github or some other service is not able to achieve this already.