Merge pull request #16276 from themechanicalcoder:video-tutorial
* Added java code for meanshift and optical_flow * added java code for module video * added appropriate spaces in codes * converted absolute path to command line arguments * added spaces at appropriate places
This commit is contained in:
committed by
Alexander Alekhin
parent
2c21ea2dd7
commit
38e6d668b1
@@ -57,6 +57,14 @@ low light, low light values are discarded using **cv.inRange()** function.
|
||||
@include samples/python/tutorial_code/video/meanshift/meanshift.py
|
||||
@end_toggle
|
||||
|
||||
@add_toggle_java
|
||||
- **Downloadable code**: Click
|
||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/video/meanshift/MeanshiftDemo.java)
|
||||
|
||||
- **Code at glance:**
|
||||
@include samples/java/tutorial_code/video/meanshift/MeanshiftDemo.java
|
||||
@end_toggle
|
||||
|
||||
Three frames in a video I used is given below:
|
||||
|
||||

|
||||
@@ -98,6 +106,14 @@ parameters (used to be passed as search window in next iteration). See the code
|
||||
@include samples/python/tutorial_code/video/meanshift/camshift.py
|
||||
@end_toggle
|
||||
|
||||
@add_toggle_java
|
||||
- **Downloadable code**: Click
|
||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/video/meanshift/CamshiftDemo.java)
|
||||
|
||||
- **Code at glance:**
|
||||
@include samples/java/tutorial_code/video/meanshift/CamshiftDemo.java
|
||||
@end_toggle
|
||||
|
||||
Three frames of the result is shown below:
|
||||
|
||||

|
||||
|
||||
@@ -109,6 +109,15 @@ below:
|
||||
@include samples/python/tutorial_code/video/optical_flow/optical_flow.py
|
||||
@end_toggle
|
||||
|
||||
|
||||
@add_toggle_java
|
||||
- **Downloadable code**: Click
|
||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/video/optical_flow/OpticalFlowDemo.java)
|
||||
|
||||
- **Code at glance:**
|
||||
@include samples/java/tutorial_code/video/optical_flow/OpticalFlowDemo.java
|
||||
@end_toggle
|
||||
|
||||
(This code doesn't check how correct are the next keypoints. So even if any feature point disappears
|
||||
in image, there is a chance that optical flow finds the next point which may look close to it. So
|
||||
actually for a robust tracking, corner points should be detected in particular intervals. OpenCV
|
||||
@@ -151,6 +160,15 @@ corresponds to Value plane. See the code below:
|
||||
@end_toggle
|
||||
|
||||
|
||||
@add_toggle_java
|
||||
- **Downloadable code**: Click
|
||||
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/video/optical_flow/OpticalFlowDenseDemo.java)
|
||||
|
||||
- **Code at glance:**
|
||||
@include samples/java/tutorial_code/video/optical_flow/OpticalFlowDenseDemo.java
|
||||
@end_toggle
|
||||
|
||||
|
||||
See the result below:
|
||||
|
||||

|
||||
|
||||
@@ -17,12 +17,12 @@ tracking and foreground extractions.
|
||||
|
||||
- @subpage tutorial_meanshift
|
||||
|
||||
*Languages:* C++, Python
|
||||
*Languages:* C++, Java, Python
|
||||
|
||||
Learn how to use the Meanshift and Camshift algorithms to track objects in videos.
|
||||
|
||||
- @subpage tutorial_optical_flow
|
||||
|
||||
*Languages:* C++, Python
|
||||
*Languages:* C++, Java, Python
|
||||
|
||||
We will learn how to use optical flow methods to track sparse features or to create a dense representation.
|
||||
|
||||
Reference in New Issue
Block a user