-
Notifications
You must be signed in to change notification settings - Fork 1
Algos first introductory assignment #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also try to have file names that are lowercase and use dashes as delimiters between words. |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's move this to |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,81 @@ | ||||||||||||||||||||||||||||||||
| # BLOB DETECTION Assignment | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Introduction | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| The supplementary python material is so that you’re familiar with the | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| language itself. This tutorial is to learn about one specific library | ||||||||||||||||||||||||||||||||
| this team utilizes often: OpenCV and a common sensor we use in our | ||||||||||||||||||||||||||||||||
| projects: stereo camera. | ||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+8
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "... learn how to utilize OpenCV with a stereo camera for blob detection." |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Why do we use a stereo camera? | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| The primary reason is for depth estimation. Let’s say there is a human | ||||||||||||||||||||||||||||||||
| standing in the road and we want to stop before we hit him. You can | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Please try to be gender neutral. |
||||||||||||||||||||||||||||||||
| imagine it would be useful to know how far we are from that person. | ||||||||||||||||||||||||||||||||
| Stereo cameras allow us to have this information. You can think of them | ||||||||||||||||||||||||||||||||
| as the “eyes” of a human driver. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Getting Started | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ### Python Virtual Enviornment (venv) | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| A common practice that most python programmers use is creating a virtual | ||||||||||||||||||||||||||||||||
| environment. This ensures we are running the correct version of a | ||||||||||||||||||||||||||||||||
| package regardless of what is already on the system. | ||||||||||||||||||||||||||||||||
|
Comment on lines
+22
to
+24
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "... virtual environment, known as a venv for short." |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| To create a virtual environment use the following command (you should | ||||||||||||||||||||||||||||||||
| already have python installed): | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| `python3 -m venv venv` | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| To activate the virtual environment: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| `source venv/bin/activate` | ||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+33
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually we prefix shell commands with a |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ### ZED SDK Installation (in a venv) | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| [Download the ZED SDK](https://www.stereolabs.com/developers/release) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| [Install the python API](https://www.stereolabs.com/docs/app-development/python/install) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| The script to install the python API will be the ZED SDK installation | ||||||||||||||||||||||||||||||||
| folder, Make sure you install it while your in your activated virtual | ||||||||||||||||||||||||||||||||
| environment. | ||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+43
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Its recommended you at least install the sample tutorials that the ZED | ||||||||||||||||||||||||||||||||
| sdk provides as a reference for this assignment and any future projects | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| using the ZED. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Project | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| *P1*: Use the OpenCV library to detect the big green circle only. Draw a | ||||||||||||||||||||||||||||||||
| bounding box around it! Break down the elements that uniquely identify | ||||||||||||||||||||||||||||||||
| the target (the big green circle). It is highly recommended you use | ||||||||||||||||||||||||||||||||
| [this function](https://learnopencv.com/blob-detection-using-opencv-python-c/): | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say name the function and link it to the current Python API. |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please give a descriptive image caption. |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Output should look like: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| *P2*: Print out the image you were originally provided and place it far | ||||||||||||||||||||||||||||||||
| away from the ZED camera. Use the python ZED API and your code from P1 | ||||||||||||||||||||||||||||||||
| to estimate the distance from the stereo camera to the target. Print | ||||||||||||||||||||||||||||||||
| this distance out. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Helpful Info**: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - The ZED cameras can be found in room 701. | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's leave this out as it's not applicable outside of our lab for others to make use of. |
||||||||||||||||||||||||||||||||
| - [How to use OpenCV with the ZED](https://www.stereolabs.com/docs/opencv/python) | ||||||||||||||||||||||||||||||||
| - [Depth Stabilization Parameters](https://www.stereolabs.com/docs/depth-sensing/depth-settings) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| *P3*: Once you are detecting the proper shape and the distance from it, | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would turn each problem into an appropriate markdown heading. |
||||||||||||||||||||||||||||||||
| measure the distance using a tape measure from the left lens of the zed | ||||||||||||||||||||||||||||||||
| to the object. Report the percent error of the true distance (tape | ||||||||||||||||||||||||||||||||
| measurer) and the estimated distance (your answer from P2). | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Note**: Note: If the ZED is giving inaccurate readings that is because | ||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Also check to see if mdBook has a proper note block, if not, lets markdown quote indent this. |
||||||||||||||||||||||||||||||||
| it has a falloff in accuracy at close ranges so try moving the image | ||||||||||||||||||||||||||||||||
| back. | ||||||||||||||||||||||||||||||||
| https://support.stereolabs.com/hc/en-us/articles/206953039-How-does-the-ZED-work | ||||||||||||||||||||||||||||||||
|
Comment on lines
+78
to
+81
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I'd also rather you properly give the link a name. |
||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we already track PNG files with Git LFS in the repo. Please ammend this commit to remove the binary file and configure Git LFS properly on your machine.