Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv4, now working #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kunaltyagi
Copy link
Contributor

This is a followup to the previous PR and sports a working compilation with OpenCV4. Please note that the submodule has been changed to point to my own fork of darknet.

I've created a PR on the original one but repointed the submodule to still keep everything working.

@mbjelonic
Copy link
Collaborator

Thanks for the commit. Just for clarification: The changes that you created enables us to use the latest darknet version?
I would like to have this pull request merged as soon as your PR to the original darknet is done. Then we can update the submodule to latest commit of the original darknet.
Marko

@kunaltyagi
Copy link
Contributor Author

I started the PR so others could start using/modifying it. Still a WIP at my place. We'll be upstreaming the bug-fixes as fast as possible.

It doesn't yet use the upstream darknet, so don't merge it, at least not yet.

@kunaltyagi kunaltyagi force-pushed the opencv4 branch 4 times, most recently from 9155cd0 to 287a5d8 Compare December 4, 2019 01:57
@kunaltyagi
Copy link
Contributor Author

Here I was recommended to use AlexeyAB/darknet instead which also comes with a CMake and seems to be more active. Maybe a switch to the other fork is a better idea.

@pat-langevin
Copy link

I tried your commit for my project and it worked! But sometimes my laptop crashes for whatever reasons, I checked the ram, the gpu, heat and everything seems fine so it may not be related to this project. One thing tho is the camera output of this version, mine looks blueish, Is it also your case? Otherwise great job! I was looking for a version that uses opencv 4 and you saved me a lot of trouble. Thanks

@kunaltyagi
Copy link
Contributor Author

mine looks blueish

Yeah, darknet needs BGR but the actual image is RGB (or some issue like that)

@klintan
Copy link

klintan commented Apr 4, 2020

Any news on this PR ? As suggested: Maybe switch to the more active darknet fork instead of the original.

@klintan klintan mentioned this pull request Apr 12, 2020
@cxhmikegithub
Copy link

@kunaltyagi I use AlexeyAB/darknet instead pjreddie/darknet in darknet_ros, but numbers of errors occur:
CMake Error at /usr/local/share/cmake-3.13/Modules/FindCUDA.cmake:1820 (add_library):
Cannot find source file:
/home/nvidia/cola/catkin_test/src/darknet_ros/darknet/src/cuda.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx

CMake Error at /usr/local/share/cmake-3.13/Modules/FindCUDA.cmake:1820 (add_library):
No SOURCES given to target: darknet_ros_lib

can you help me ? Thank you

@kunaltyagi
Copy link
Contributor Author

I actually stopped mid-way in porting to AlexyAB due to some linker issues. My (partial) work is available at https://github.com/kunaltyagi/darknet_ros/tree/alexeyab and I welcome contributions to help improve it.

@cxhmikegithub
Copy link

@kunaltyagi thank you , I tried your work , and receive errors:
/home/nvidia/cola/catkin_ws/src/darknet_ros-alexeyab/darknet_ros/src/YoloObjectDetector.cpp:373:25: error: ‘mat_to_image’ was not declared in this scope
buff_[buffIndex_] = mat_to_image(ROS_img);
^~~~~~~~~~~~
/home/nvidia/cola/catkin_ws/src/darknet_ros-alexeyab/darknet_ros/src/YoloObjectDetector.cpp:373:25: note: suggested alternative: ‘float_to_image’
buff_[buffIndex_] = mat_to_image(ROS_img);
^~~~~~~~~~~~
float_to_image

I find mat_to_image in YoloObjectDetector.cpp, it was not declared indeed

@kunaltyagi
Copy link
Contributor Author

I'm aware of the error. Can't proceed beyond either a compile or linker error for these 2 functions. Please discuss this on my fork, and let's not pollute here with unrelated issues 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error "OpenCV 4.x+ requires enabled C++11 support"
7 participants