All Projects → luczeng → HoughRectangle

luczeng / HoughRectangle

Licence: other
Rectangle detection using the Hough transform

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to HoughRectangle

LEDNet
This is an unofficial implemention of LEDNet https://arxiv.org/abs/1905.02423
Stars: ✭ 37 (-51.32%)
Mutual labels:  segmentation
mobilenet segmentation
Binary semantic segmentation with UNet based on MobileNetV2 encoder
Stars: ✭ 18 (-76.32%)
Mutual labels:  segmentation
unsupervised llamas
Code for https://unsupervised-llamas.com
Stars: ✭ 70 (-7.89%)
Mutual labels:  segmentation
Entity
EntitySeg Toolbox: Towards Open-World and High-Quality Image Segmentation
Stars: ✭ 313 (+311.84%)
Mutual labels:  segmentation
Opensource OBIA processing chain
An open-source semi-automated processing chain for urban OBIA classification.
Stars: ✭ 75 (-1.32%)
Mutual labels:  segmentation
segmentation-paper-reading-notes
segmentation paper reading notes
Stars: ✭ 39 (-48.68%)
Mutual labels:  segmentation
UCTransNet
Implementation of our AAAI'22 work: 'UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-wise Perspective with Transformer'.
Stars: ✭ 132 (+73.68%)
Mutual labels:  segmentation
Image-Processing-in-Python
This repository contains the links to the article that I wrote on Medium pertaining to Image processing.
Stars: ✭ 23 (-69.74%)
Mutual labels:  segmentation
pedx
Python tools for working with PedX dataset.
Stars: ✭ 26 (-65.79%)
Mutual labels:  segmentation
DeepFashion MRCNN
Fashion Item segmentation with Mask_RCNN
Stars: ✭ 29 (-61.84%)
Mutual labels:  segmentation
DSeg
Invariant Superpixel Features for Object Detection
Stars: ✭ 18 (-76.32%)
Mutual labels:  segmentation
torch-points3d
Pytorch framework for doing deep learning on point clouds.
Stars: ✭ 1,823 (+2298.68%)
Mutual labels:  segmentation
DigiPathAI
Digital Pathology AI
Stars: ✭ 43 (-43.42%)
Mutual labels:  segmentation
U-Net-Satellite
Road Detection from satellite images using U-Net.
Stars: ✭ 38 (-50%)
Mutual labels:  segmentation
segmentation training pipeline
Research Pipeline for image masking/segmentation in Keras
Stars: ✭ 54 (-28.95%)
Mutual labels:  segmentation
HRFormer
This is an official implementation of our NeurIPS 2021 paper "HRFormer: High-Resolution Transformer for Dense Prediction".
Stars: ✭ 357 (+369.74%)
Mutual labels:  segmentation
FCN-Segmentation-TensorFlow
FCN for Semantic Image Segmentation achieving 68.5 mIoU on PASCAL VOC
Stars: ✭ 34 (-55.26%)
Mutual labels:  segmentation
TNSCUI2020-Seg-Rank1st
This is the source code of the 1st place solution for segmentation task in MICCAI 2020 TN-SCUI challenge.
Stars: ✭ 161 (+111.84%)
Mutual labels:  segmentation
segmenter
[ICCV2021] Official PyTorch implementation of Segmenter: Transformer for Semantic Segmentation
Stars: ✭ 463 (+509.21%)
Mutual labels:  segmentation
Segmentation-Series-Chaos
Summary and experiment includes basic segmentation, human segmentation, human or portrait matting for both image and video.
Stars: ✭ 75 (-1.32%)
Mutual labels:  segmentation

Hough rectangle detection

Intro

This is a personal project which aim is to implemenent a rectangle detection algorithm using the Hough transform from the paper "Rectangle Detection based on a Windowed Hough Transform" from C.Jung and R.Schramm.

The Hough rectangle detection is based on detecting specific patterns in the Hough line transform domain of an image. The algorithm relies on a windowed Hough transform to achieve robustness.

The implementation is done in c++ and is intended to be lightweight, ie no image processing library is used. We mostly rely on "Eigen" for image manipulation. The algorithm expects edge detection to be performed first. The edge detection is not part of the repo. You can use any library to perform this preprocessing.

I plan to bring improvements to the original algorithm in order to make it faster. The main cause for slowness is the sliding window scheme. I plan to reuse previous computations in order to reduce redudant ones. More info to come.

The work is currently in progress. Stay tuned!

Requirements

  • cmake >3.11.4
  • c++ 14
  • Third party libraries are part of the repo: Eigen, catch2, stb, cereal

Usage

For now, the code only accepts png images. The input image is expected to be an edge detected image.

mkdir build 
cd build
cmake ..
make
./apps/main_hough_rectangle -i some_img.png -o output_img.txt

The rectangles are saved line by line in the following format: x1,y1,x2,y2,x3,y3,x4,y4

Algorithm

The Hough rectangle detection algorithm relies on detecting specific patterns in the Hough domain, as illustrated below:

Rectangle Corresponding Hough pattern Detected rectangle

Project status:

  • Hough transform : done
  • Enhanced Hough transform : done
  • Windowed Hough transform : done
  • Peak detection: done
  • Hough rectangle detection on rectangle-centric image: done
  • Hough rectangle detection on full image: done
  • Acceleration: in progress

Helper scripts

Some python opencv scripts in "utils" folder are provided to facilitate usage. Require opencv and matplolib. Call -hfor help:

-detect_edges: applies Canny edge detection algorithm to input.
-create_rectangle: creates some dummy rectangles, with or without an angle.

Configuration:

Algorithm parameters can be modified in src/configs.json:

  1. Hough transform parameters:

    • theta_bins: number of angle bins
    • rho_bins: number of bins for the normal length
    • theta_min: minimum angle (don't change)
    • theta_max: maximum angle (don't change)
  2. Enhanced Hough transform parameters:

    • h: height of neighboorhood used to enhance Hough Transform
    • w: width of neighboorhood used to enhance Hough Transform
  3. Windowed Hough transform parameters:

    • L_window: size of the window. Should be bigger than the maximum size of your rectangles
    • r_min: inside radius of the windowed Hough transform
    • r_max: outside radius of the windowed Hough transform
  4. Rectangle detection parameters:

    • min_side_length: minimum side length of a rectangle
    • T_theta: minimum angle difference (in degrees) between two corners of a rectangle
    • T_rho: minimum normal length difference (in pixel) between two corners of a rectangle
    • T_l:
    • T_alpha: minimum corner difference (in degrees) between opposite corners of a rectangle.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].