diff --git "a/\320\220\320\273\320\264\320\260\321\200\320\276\320\262\320\220\320\232_\320\221\320\230\320\222211_\320\237\320\2401.ipynb" "b/\320\220\320\273\320\264\320\260\321\200\320\276\320\262\320\220\320\232_\320\221\320\230\320\222211_\320\237\320\2401.ipynb" index 4efad476645f9766199ebbb99d3d37fc003b0703..45daa242534dcfa6fc5f6dfa94f2ed5b5b92ccc4 100644 --- "a/\320\220\320\273\320\264\320\260\321\200\320\276\320\262\320\220\320\232_\320\221\320\230\320\222211_\320\237\320\2401.ipynb" +++ "b/\320\220\320\273\320\264\320\260\321\200\320\276\320\262\320\220\320\232_\320\221\320\230\320\222211_\320\237\320\2401.ipynb" @@ -16,7 +16,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 72, + "execution_count": 1, "metadata": { "id": "rkL66VFAv45A" }, @@ -38,15 +38,15 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "ada8ee6d-c7f7-4d51-e19f-de5e6fbc299a" + "outputId": "5f793442-2a13-4fae-e8a1-b4654dac0389" }, - "execution_count": 73, + "execution_count": 2, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n" + "Mounted at /content/drive\n" ] } ] @@ -70,7 +70,7 @@ "metadata": { "id": "9b9vy_GWwtDE" }, - "execution_count": 74, + "execution_count": 46, "outputs": [] }, { @@ -95,7 +95,7 @@ "metadata": { "id": "NcGSNZoG8sSw" }, - "execution_count": 75, + "execution_count": 47, "outputs": [] }, { @@ -106,24 +106,24 @@ " for cx, cy in points:\n", " cv2.drawMarker(frame, (cx, cy), color=color, thickness=2, \\\n", " markerType=cv2.MARKER_TILTED_CROSS, line_type=cv2.LINE_AA, \\\n", - " markerSize=15)" + " markerSize=10)" ], "metadata": { "id": "uBNLkUpK_K_U" }, - "execution_count": 76, + "execution_count": 48, "outputs": [] }, { "cell_type": "code", "source": [ - "high_color = (87,86,104)\n", - "lower_color = (35, 30, 40)" + "high_color = (255,160,80)\n", + "lower_color = (0, 0, 0)" ], "metadata": { - "id": "nakl8vS_C0zM" + "id": "8UMhTvFQ395R" }, - "execution_count": 77, + "execution_count": 49, "outputs": [] }, { @@ -140,8 +140,8 @@ " ret, frame = cap.read()\n", "\n", " if ret:\n", - " frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) # BGR -> RGB\n", - " frame_thres = cv2.inRange(frame, lower_color, high_color) # Image thresholding\n", + " frame_hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) # BGR -> HSV\n", + " frame_thres = cv2.inRange(frame_hsv, lower_color, high_color) # Image thresholding\n", "\n", " coordinates = find_centroid(frame_thres)\n", " if coordinates is not None:\n", @@ -149,30 +149,15 @@ "\n", " draw_cross(frame, points)\n", "\n", - " frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)\n", - "\n", " writer.write(frame)\n", "\n", - "writer.release()\n", - "print('Done!')" + "writer.release()" ], "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "rpr4YJZN4R0s", - "outputId": "48afa7f2-0ac3-4880-cf7e-5ba51d2d7eaf" + "id": "rpr4YJZN4R0s" }, - "execution_count": 78, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Done!\n" - ] - } - ] + "execution_count": 50, + "outputs": [] } ] } \ No newline at end of file