mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-17 07:04:18 +08:00

Julia Bindings GSoC - phase1 * Julia Phase 1 first commit * a few fixes to compile julia bindings on mac * Readme changes * Allow usage before installation and update README * Add CxxWrap installation and fix Mac build bug * CMake fixes and test refactoring * add tests, fix trailing whitespace, disable array-vec conversion * Fix trailing whiteline and warning * Add module documentation and fix tests in CMake * Change copyright block, CMake variable name * copy => copy_if_different * fix status dump and return lines * Remove Julia_Found outside init.cmake * change indentation Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
30 lines
630 B
Julia
30 lines
630 B
Julia
using OpenCV
|
|
|
|
println("")
|
|
println("This is a simple exmample demonstrating the use of SimpleBlobDetector")
|
|
println("")
|
|
print("Path to image: ")
|
|
img_dir = readline()
|
|
|
|
img = OpenCV.imread(img_dir)
|
|
img_gray = OpenCV.cvtColor(img, OpenCV.COLOR_BGR2GRAY)
|
|
|
|
OpenCV.namedWindow("Img - Color")
|
|
OpenCV.namedWindow("Img - Gray")
|
|
|
|
|
|
OpenCV.imshow("Img - Color", img)
|
|
OpenCV.imshow("Img - Gray", img_gray)
|
|
|
|
OpenCV.waitKey(Int32(0))
|
|
|
|
OpenCV.destroyAllWindows()
|
|
|
|
detector = OpenCV.SimpleBlobDetector_create()
|
|
kps = OpenCV.detect(detector, img_gray)
|
|
|
|
println("Number of keypoints: ", size(kps))
|
|
for kp in kps
|
|
println(kp.pt, "\t", kp.size)
|
|
end
|