Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

OpenCv for Python: Detect Motion 1 Capture an image 2 Create blank images: A. grayscale image with proper dimensions B. 32f, 3 channel image C.

OpenCv for Python:

Detect Motion

1 Capture an image

2 Create blank images:

A. grayscale image with proper dimensions

B. 32f, 3 channel image

C. a capture clone we'll call image1

D. One to hold the result from the absDiff function. (absolute difference)

3 while loop to capture images......

4 grab new frame

A. I brightened image a bit first which helped

5. blur the image

6. take running average of frame: accumulateWeighted

7 swap running average result from step 6 to same bits as frame: convertScaleAbs

8 Take difference, built in OpenCV function to do a diff between two images.

9 convert to grayscale

10 Threshhold grayscale (using a low number)

11 Blur grayscale image

12 Threshhold grayscale again (using a high number)

13 find contours: findContours

14 Use contours to find significant blobs,

15 draw polygons of blobs

16 use dimensions of blobs to draw bounding boxes and center on original image

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago