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
The virtual calculator will be above the live streaming from your camera

The virtual calculator is above the live streaming from my camera usb , the program first detect my hand and in each frame calculate the distance between two finger ,if the distance is lower than the

gasbaoui mohammed al amine 5 Jul 01, 2022
The code for CVPR2022 paper "Likert Scoring with Grade Decoupling for Long-term Action Assessment".

Likert Scoring with Grade Decoupling for Long-term Action Assessment This is the code for CVPR2022 paper "Likert Scoring with Grade Decoupling for Lon

10 Oct 21, 2022
deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications

Automatic Weapon Detection Deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications. Loved the pro

Janhavi 4 Mar 04, 2022
Select range and every time the screen changes, OCR is activated.

ASOCR(Auto Screen OCR) Select range and every time you press Space key, OCR is activated. 範囲を選ぶと、あなたがスペースキーを押すたびに、画面が変わる度にOCRが起動します。 usage1: simple OC

1 Feb 13, 2022
Deep learning based page layout analysis

Deep Learning Based Page Layout Analyze This is a Python implementaion of page layout analyze tool. The goal of page layout analyze is to segment page

186 Dec 29, 2022
Geometric Augmentation for Text Image

Text Image Augmentation A general geometric augmentation tool for text images in the CVPR 2020 paper "Learn to Augment: Joint Data Augmentation and Ne

Canjie Luo 440 Jan 05, 2023
Camelot: PDF Table Extraction for Humans

Camelot: PDF Table Extraction for Humans Camelot is a Python library that makes it easy for anyone to extract tables from PDF files! Note: You can als

Atlan Technologies Pvt Ltd 3.3k Dec 31, 2022
a Deep Learning Framework for Text

DeLFT DeLFT (Deep Learning Framework for Text) is a Keras and TensorFlow framework for text processing, focusing on sequence labelling (e.g. named ent

Patrice Lopez 350 Dec 19, 2022
Code for the AAAI 2018 publication "SEE: Towards Semi-Supervised End-to-End Scene Text Recognition"

SEE: Towards Semi-Supervised End-to-End Scene Text Recognition Code for the AAAI 2018 publication "SEE: Towards Semi-Supervised End-to-End Scene Text

Christian Bartz 572 Jan 05, 2023
Python rubik's cube solver

This program makes a 3D representation of a rubiks cube and solves it step by step.

Pablo QB 4 May 29, 2022
This is an API written in python that uses FastAPI. It is a simple API that can detect discord tokens in Images.

Welcome This is an API written in python that uses FastAPI. It is a simple API that can detect discord tokens in Images. Installation There are curren

8 Jul 29, 2022
Automatically fishes for you while you are afk :)

Dank-memer-afk-script A simple and quick way to make easy money in Dank Memer! How to use Open a discord channel which has the Dank Memer bot enabled.

Pranav Doshi 9 Nov 11, 2022
FOTS Pytorch Implementation

News!!! Recognition branch now is added into model. The whole project has beed optimized and refactored. ICDAR Dataset SynthText 800K Dataset detectio

Ning Lu 599 Dec 19, 2022
Controlling the computer volume with your hands // OpenCV

HandsControll-AI Controlling the computer volume with your hands // OpenCV Step 1 git clone https://github.com/Hayk-21/HandsControll-AI.git pip instal

Hayk 1 Nov 04, 2021
A program that takes in the hand gesture displayed by the user and translates ASL.

Interactive-ASL-Recognition Using the framework mediapipe made by google, OpenCV library and through self teaching, I was able to create a program tha

Riddhi Bajaj 3 Nov 22, 2021
Responsive Doc. scanner using U^2-Net, Textcleaner and Tesseract

Responsive Doc. scanner using U^2-Net, Textcleaner and Tesseract Toolset U^2-Net is used for background removal Textcleaner is used for image cleaning

3 Jul 13, 2022
This is a GUI for scrapping PDFs with the help of optical character recognition making easier than ever to scrape PDFs.

pdf-scraper-with-ocr With this tool I am aiming to facilitate the work of those who need to scrape PDFs either by hand or using tools that doesn't imp

Jacobo José Guijarro Villalba 75 Oct 21, 2022
Course material for the Multi-agents and computer graphics course

TC2008B Course material for the Multi-agents and computer graphics course. Setup instructions Strongly recommend using a custom conda environment. Ins

16 Dec 13, 2022
huoyijie 1.2k Dec 29, 2022
Usando o Amazon Textract como OCR para Extração de Dados no DynamoDB

dio-live-textract2 Repositório de código para o live coding do dia 05/10/2021 sobre extração de dados estruturados e gravação em banco de dados a part

hugoportela 0 Jan 19, 2022