Comments (8)
- You are right: disable all cropping of the frame by commenting of
frame = frame[:, w-h : w]
and check out what you will get. HALF_AREA
has nothing to do with frame visibility, leave it untouched.- Speed. There are two variables within the loop:
distance
andt
– just divide deltas when you need, if you don't want wait my updates. - Real-time out of the box. Not in the current version. But you can replace
cv2.VideoCapture(filename)
withcv2.VideoCapture(0)
and the input will be changed from video file to your webcam.
Please open new issue when you'll run into new problem.
from animal-tracking.
- disable all cropping of the frame by commenting of frame = frame[:, w-h : w] and check out what you will get - when i did that it gives me errror :
[libopenh264 @ 000002430bd46d00] Incorrect library version loaded
Could not open codec 'libopenh264': Unspecified error
2.Speed. There are two variables within the loop: distance and t – just divide deltas when you need, if you don't want wait updates. -this what i didnt understand i've tried to name it average= distance / time . but error said that i must to disribe the average i tryed to make it as the distance average = _x = _y = 0 but it does not help.
Real-time out of the box. Not in the current version. But you can replace cv2.VideoCapture(filename) by cv2.VideoCapture(0) and the input will be changed from video file to your webcam. --- when i made that it showed me in preprocessing box my webcam but after i have choosen area it showed me 2 times smaller half version of my rat.mp4 movie in the left side and normal half version
and also it gives an error but works :
[ WARN:1] terminating async callback
Failed to load OpenH264 library: openh264-1.8.0-win64.dll
Please check environment and/or download library: https://github.com/cisco/openh264/releases
[libopenh264 @ 00000242f45b9f40] Incorrect library version loaded
from animal-tracking.
and also when i run your code without any chages it works but shows an error:
[libopenh264 @ 0000015610afadc0] Incorrect library version loaded
Could not open codec 'libopenh264': Unspecified error
from animal-tracking.
- What do you mean by
it works but shows an error
You mean, the processing runs on UI but you
Could not open codec 'libopenh264'
on your terminal in the same time?
If yes, so what is the problem with the step 1?
- May be the problem is not with
average
but withtime
variable? There is notime
variable, there ist
.
-
but after i have choosen area it showed me 2 times smaller half version of my rat.mp4 movie in the left side and normal half version
It's about rat.mp4
or about the picture from your webcam? If you are observing the replacement the picture from webcam by picture from your movie, then probably you have replaced cv2.VideoCapture(filename)
not everywhere.
Anyway such picture is exactly what you will get, because left side shows the selected area on the right side expanded to full size of left half of UI window. The point is to get rid of perspective deformations of the camera. If you don't care about perspective just select full area on the right side and then you'll get the same picture on the left side.
from animal-tracking.
and also when i run your code without any chages it works but shows an error:
[libopenh264 @ 0000015610afadc0] Incorrect library version loaded
Could not open codec 'libopenh264': Unspecified error
First of all try to install H.264 from K-Lite Codec Pack.
from animal-tracking.
Yeah , thanks I’ll try . Also I’ve made an experiments with black box and less illumination - and it worked in real time !))but it was not counting time .
from animal-tracking.
I comment all of the frame = frame[:, w-h : w] but got an error:
imgContour = cv2.add(imgPoints, imgTrack)
cv2.error: OpenCV(4.5.5) /Users/runner/work/opencv-python/opencv-python/opencv/modules/core/src/arithm.cpp:650: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'arithm_op'.
My video size is 1960*1280. I print the imgPoints and imgTrack, get (1080, 1080, 3) (1080, 1920, 3).
from animal-tracking.
Nothing unexpected: you are trying to add frames of different sizes.
What is your goal? Why do you need to stack together non-squared frames, while the algorithm is supposed to stack square ones? Do you have a rectangular open field?
from animal-tracking.
Related Issues (20)
- Track.py Code Issue
- Tracking is not working HOT 3
- Taking the right side square of the camera environment HOT 4
- The cropping method HOT 3
- An added GUI with tkinter HOT 9
- I want to remove the normal colored frame HOT 1
- Can you look at my last 2 issues ? HOT 2
- Issue with tkinter gui
- How is the distance calculated ? HOT 3
- Can I change the way the distance is calculated ? HOT 16
- Description of my problem about running long play video file HOT 1
- Issues with the code HOT 1
- Code not running properly HOT 4
- Vidéo split in two HOT 1
- ValueError: need more than 2 values to unpack HOT 1
- Open field test for circular arena HOT 1
- Two errors that I came across HOT 3
- IndexError: list index out of range HOT 11
- Calibration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animal-tracking.