This repo contains a script that allows us to find range of colors in images using openCV, and then convert them into geo vectors.

Overview

Vectorizing color range

This repo contains a script that allows us to find range of colors in images using openCV, and then convert them into geo vectors.

Install

git clone https://github.com/developmentseed/color_range_filter.git
cd color_range_filter/
docker-compose build

How to use it?

In order to use this script we need to find first the HSV , kernek and area values.

Execute the HSV color picker with the follow script

    python src/hsv_color_picker.py --image_file=data/141013-193791-19-st.png

Require: The images that we pass to the script should be named as {x}-{y}-{z}.png for tiles and {x}-{y}-{z}-st.png for super-tiles

Once the script is running, it will appear two windows, one of the image and the other for some other adjustments.

image

Where:

  • Area: To adjust the area of the color classification.

  • Eval color Range: This is for adjusting the range of color to take the HSV values.

  • Kernel: Describes how the pixels involved in the computation are combined in order to obtain the desired result.

  • Crop image range: In some cases we may need only the area to work on, the maximum - 20 value means take all the image to get the color classification.

  • In the image Window, click the area where you want to select: eg. 👇 , Finding grass:

image

  • Once you have the desire selection , press key e and it will export a geojson file at same path of the image, and then it can be loaded in Qgis or JOSM.

image

Runing the scrpit for large areas

For running in large area it is necessary to HSV, kernel and area values, it can be obtained from the console log in the previous step. E.g. The below values are for finding trees in urban areas.

    --hsv_lower=31,25,9 \
    --hsv_upper=131,125,189 \
    --area=2000,50000 \
    --kernel=2 \
  • Use the following values in the script 👇
docker run --rm -v ${PWD}:/mnt developmentseed/vector_color:v1 python src/range.py \
    --geojson_tiles_file=data/tiles.geojson \
    --output_folder=data/tiles/ \
    --url_map_service="https://tile.openstreetmap.org/{z}/{x}/{y}.png" \
    --hsv_lower=20,3,15 \
    --hsv_upper=75,145,191 \
    --area=2000,10000 \
    --kernel=2 \
    --tags=class=tree \
    --geojson_output=data/tree.geojson

Output 👇

2021-10-06 21 17 42_fixed

Owner
Development Seed
Development Seed
Creating a virtual tv using opencv in python3.

Virtual-TV Creating a virtual tv using opencv in python3. In order to run the code follow the below given steps: Make sure the desired videos which ar

Vamsi 1 Jan 01, 2022
ScanTailor Advanced is the version that merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and fixes.

ScanTailor Advanced The ScanTailor version that merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and f

952 Dec 31, 2022
ARU-Net - Deep Learning Chinese Word Segment

ARU-Net: A Neural Pixel Labeler for Layout Analysis of Historical Documents Contents Introduction Installation Demo Training Introduction This is the

128 Sep 12, 2022
Recognizing cropped text in natural images.

ASTER: Attentional Scene Text Recognizer with Flexible Rectification ASTER is an accurate scene text recognizer with flexible rectification mechanism.

Baoguang Shi 681 Jan 02, 2023
Scale-aware Automatic Augmentation for Object Detection (CVPR 2021)

SA-AutoAug Scale-aware Automatic Augmentation for Object Detection Yukang Chen, Yanwei Li, Tao Kong, Lu Qi, Ruihang Chu, Lei Li, Jiaya Jia [Paper] [Bi

Jia Research Lab 182 Dec 29, 2022
天池2021"全球人工智能技术创新大赛"【赛道一】:医学影像报告异常检测 - 第三名解决方案

天池2021"全球人工智能技术创新大赛"【赛道一】:医学影像报告异常检测 比赛链接 个人博客记录 目录结构 ├── final------------------------------------决赛方案PPT ├── preliminary_contest--------------------

19 Aug 17, 2022
A Screen Translator/OCR Translator made by using Python and Tesseract, the user interface are made using Tkinter. All code written in python.

About An OCR translator tool. Made by me by utilizing Tesseract, compiled to .exe using pyinstaller. I made this program to learn more about python. I

Fauzan F A 41 Dec 30, 2022
Here use convulation with sobel filter from scratch in opencv python .

Here use convulation with sobel filter from scratch in opencv python .

Tamzid hasan 2 Nov 11, 2021
The open source extract transaction infomation by using OCR.

Transaction OCR Mã nguồn trích xuất thông tin transaction từ file scaned pdf, ở đây tôi lựa chọn tài liệu sao kê công khai của Thuy Tien. Mã nguồn có

Nguyen Xuan Hung 18 Jun 02, 2022
The CIS OCR PostCorrectionTool

The CIS OCR Post Correction Tool PoCoTo Source code for the Java-based PoCoTo client enabling fast interactive batch corrections of complete OCR error

CIS OCR Group 36 Dec 15, 2022
Distort a video using Seam Carving (video) and Vibrato effect (sound)

Distort videos Applies a Seam Carving algorithm (aka liquid rescale) on every frame of a video, and a vibrato effect on the audio to distort the video

AlexZeGamer 6 Dec 06, 2022
color detection using python

colordetection color detection using python In this color detection Python project, we are going to build an application through which you can automat

Ruchith Kumar 1 Nov 04, 2021
An application of high resolution GANs to dewarp images of perturbed documents

Docuwarp This project is focused on dewarping document images through the usage of pix2pixHD, a GAN that is useful for general image to image translat

Thomas Huang 97 Dec 25, 2022
Fatigue Driving Detection Based on Dlib

Fatigue Driving Detection Based on Dlib

5 Dec 14, 2022
An interactive document scanner built in Python using OpenCV

The scanner takes a poorly scanned image, finds the corners of the document, applies the perspective transformation to get a top-down view of the document, sharpens the image, and applies an adaptive

Kushal Shingote 1 Feb 12, 2022
Program created with opencv that allows you to automatically count your repetitions on several fitness exercises.

Virtual partner of gym Description Program created with opencv that allows you to automatically count your repetitions on several fitness exercises li

1 Jan 04, 2022
Brief idea about our project is mentioned in project presentation file.

Brief idea about our project is mentioned in project presentation file. You just have to run attendance.py file in your suitable IDE but we prefer jupyter lab.

Dhruv ;-) 3 Mar 20, 2022
Using Opencv ,based on Augmental Reality(AR) and will show the feature matching of image and then by finding its matching

Using Opencv ,this project is based on Augmental Reality(AR) and will show the feature matching of image and then by finding its matching ,it will just mask that image . This project ,if used in cctv

1 Feb 13, 2022
A small C++ implementation of LSTM networks, focused on OCR.

clstm CLSTM is an implementation of the LSTM recurrent neural network model in C++, using the Eigen library for numerical computations. Status and sco

Tom 794 Dec 30, 2022
Learning Camera Localization via Dense Scene Matching, CVPR2021

This repository contains code of our CVPR 2021 paper - "Learning Camera Localization via Dense Scene Matching" by Shitao Tang, Chengzhou Tang, Rui Hua

tangshitao 65 Dec 01, 2022