Created
May 22, 2018 03:16
-
-
Save TonsOfFun/05abcc852c53b31b3bf963cdd5b81a78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 6, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "The plants grew 27918 pixels in 5 days\n", | |
| "27.918 square centimeters of canopy growth\n", | |
| "10.991344518 square inches of canopy growth\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "week_1_canopy = cv2.countNonZero(week_1_mask)\n", | |
| "week_2_canopy = cv2.countNonZero(week_2_mask)\n", | |
| "pixel_growth = week_2_canopy - week_1_canopy\n", | |
| "sq_centimeter_growth = pixel_growth / 1000\n", | |
| "sq_inch_growth = sq_centimeter_growth * 0.393701\n", | |
| "print(\"The plants grew \" + str(pixel_growth) + \" pixels in 5 days\")\n", | |
| "print(str(sq_centimeter_growth) + \" square centimeters of canopy growth\")\n", | |
| "print(str(sq_inch_growth) + \" square inches of canopy growth\")" | |
| ] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python 3", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.6.3" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment