opencv_createsamples.exe location for conda install - opencv

I am trying to create a cascade classifier for my program.The docs mention using a script in order to help generate positive images, but I don't know where to get this script. I am wondering if the opencv_createsamples application is available for opencv installs via conda. How can I obtain it?

You can obtain the script executable by either building OpenCV v3 from source. The conda install will not include them. You will find the applications and how to build them in the repositorys apps folder
If you are on Linux there is a package available: sudo apt get install libopencv
After you install you can run opencv_createsamples [options]
Manpage

Related

Error: yq#3 has been disabled because it is not maintained upstream! How to install a disabled brew Formulae?

I'm trying to install yq#3 on my Mac running brew install yq#3 and I get the error:
Error: yq#3 has been disabled because it is not maintained upstream!
I see that it's there on their website at https://formulae.brew.sh/formula/yq#3#default but it doesn't seem to be supported anymore.
I still need to install it since our projects at work are using this specific version.
The only way that I'm thinking about is downloading the source code, building it myself, and adding it to the path but I'm thinking that there might be a simpler solution.
Any suggestion?
Thanks!
From yq github, you can install a binary by running:
wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_darwin_amd64 -O /usr/local/bin/yq &&\
chmod +x /usr/local/bin/yq
3.4.1 is the latest 3 version, darwin_amd64 is the Mac package (don't worry about having an Intel machine and installing the package that says AMD, the name comes from something about AMD invented the 64-bit instruction set).

Opencv installation problems

I am trying to follow a guide to install Opencv however I am having problems.
I am following this guide:
https://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/
However there is an addendum when it reaches this point:
Update — 15 May 2017:
Which then sends you to this page:
This Page
As stated in this guide I installed OpenCV3 using this command:
brew install opencv3 --with-contrib --with-python3
I then stepped back to the original install guide here
However when checking my site packages using this line:
ls -l /usr/local/opt/opencv3/lib/python3.7/site-packages/
The directory is not found.
I then tried to cd to this directory one step at a time and found in my 'opt' directory that some of the folders were names incorrectly or at least different than to be expected.
I have two opencv folders:
opencv
opencv#3
I also have three python folders:
python3
python#2
python#3
Should I rename the opencv and python folders? If so how?
Mac OS High Sierra

Installing OpenCV using Virtual Environment (Ubuntu 16)

I want to install OpenCV. First thing I did was creating a virtual environment by following command in Ubuntu 16:
" conda create -n opencv3.4_py3.6 "
Then, I followed the official instruction here (Building OpenCV from source):
https://docs.opencv.org/3.4/d2/de6/tutorial_py_setup_in_ubuntu.html
However, when I tried to install dependencies, the following message came up:
Unable to locate package "Package Name"
As it can be seen int the attached image
My purpose is installing OpenCV in a Virtual Environment. Also, I want to import and use OpenCV in Spyder.
Any idea about how it can be done?
(Spyder maintainer here) After doing
conda create -n opencv3.4_py3.6
you need to run these other three commands to get what you want
source activate opencv3.4_py3.6
conda install opencv python=3.6*
conda install spyder
You don't need to compile Opencv because you can install it with conda.

Anaconda - Manually adding a built package

I have build OpenCV (using cmake) and I can see the libs, include and bin files copied to my conda desired env. However, using conda list doesn't list the OpenCV. Is there a way to overcome this?
conda list will only show pip install or conda install installed packages.
To verify if OpenCV works, type below to check the version.
import cv2
print cv2.__version__
Hope this answer your question.

Unable to find Lua headers with find_package in cmake

I'm trying to use CMake to build generate the make file for a project of mine that uses Lua. When I run make I get this error:
/path/to/my/project/luaudio/luaudio.c:1:17: fatal error: lua.h: No such file or directory
In the CMakeLists.txt file, I have the following lines, which I thought would do it, but apparently they're not enough:
find_package(Lua51 REQUIRED)
set(Luaudio_INCLUDE_DIRS ${Luaudio_SOURCE_DIR} ${Lua51_INCLUDE_DIRS} PARENT_SCOPE)
include_directories(${Luaudio_INCLUDE_DIRS})
Lua51_Include_Dirs appears to be empty (attempting to run it though the message command doesn't print anything) so I suspect that it just can't find it. Do I need to specify where to look for Lua? I was under the impression that the whole point of find_package was that it would look in a set a predefined places so that I don't need to specify where it is specifically.
(This is on an Ubuntu machine and I do have the Lua packages installed.)
install lua bin:
sudo apt-get install lua5.1
install lua lib:
sudo apt-get install lua5.1-dev
Exploring FindLua51.cmake from cmake 2.8 I found that it sets LUA_INCLUDE_DIR variable instead of Lua51_INCLUDE_DIRS. So cmake code should be
find_package(Lua51 REQUIRED)
set(Luaudio_INCLUDE_DIRS ${Luaudio_SOURCE_DIR} ${LUA_INCLUDE_DIR} PARENT_SCOPE)
include_directories(${Luaudio_INCLUDE_DIRS})
for Ubuntu 14.04
sudo apt install lua5.2;
sudo apt install liblua5.2-dev;

Resources