Skip to content

Computer Vision Assignment on Color Quantization using K-means and Circle Detection using Hough Transform

Notifications You must be signed in to change notification settings

Isha957/Color-Quantization-and-Circle-Detection-

Repository files navigation

Color-Quantization-and-Circle-Detection-

Computer Vision Assignment on Color Quantization using K-means and Circle Detection using Hough Transform

The focus of the Repository:


This Repository contains a code solutions along with a Report for a Computer Vision Assignment for two problems:
  • Quantization of Color Space using K-means Clustering:
  • Implementation of Hough Transform Circle Detector:
  • Problem - 1: COLOR QUANTIZATION:


    Given Image:


    • Quantize a 3-dimensional RGB image and map pixels to its nearest k-means center
    • Converting a 3-dimensional RGB image into a HSVand quantize the 1-dimensional hue space
    • Compute the SSD error between RGB image pixels and quantized pixels for both RGB and HSV space
    • Displaying the histograms of hue values with equally spaced bins and bins defined by K cluster centers
    • Results

      RGB Quantized

      HSV Quantized

      Histograms



      SSD Error



      Problem - 2: CIRCLE DETECTION


      Given Image:


      • Implementing a hough transform Circle Detector that takes an input image and fixed radius and returns centers of any detected circles.
      • The output centers is a NX2 matrix in which each row lists (x,y) position of the detected circles' center
      • Displaying the Hough Transform accumulator array
      • Experimenting on how to determine the number of circlepresent by post-processing the accumulator array
      • Describing the impact of the vote space quantization(bin size)/i>

      Results

      Detection Radius =10 and accumulator array


      Detection Radius =30 and accumulator array


      Detection Radius =100 and accumulator array


      Repository Files:


      Code Implementation:
      • ColorQuantize.py - main code that calls the other helper functions
        • computeQuantizationerror.py - SSD error between quantized and original pixels
        • quantizeHSV.py - converts RGB image to HSV and quantize 1-D Hue space
        • quantizeRGB.py - quantizes 3D RGB image with K-means
      • detectCircles.py - code implementation for CircleDetection
      Image png files:
      • Image 1 - fish.png
      • Image 2 - jupiter.png
      Report

About

Computer Vision Assignment on Color Quantization using K-means and Circle Detection using Hough Transform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages