Giter VIP home page Giter VIP logo

ronny-22-code / color-extraction-and-image-segmentation Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 273 KB

This repository introduces to my personal project, which explains and demonstrates the concept of segmentation of feature vectors according to the "Dominant Characteristic Feature" persistent in the image. The demonstration of the project was achieved by the application of "K-Means" Clustering algorithm, which is an unsupervised machine learning algorithm typically used for vector quantization and signal processing with data mining. This algorithm follows an iterative approach to segment or partition the dataset effectively, into K pre-defined clusters or overlapping sub-groups. The output obtained is the dominant color schemes demonstrated through graphical representation persistent in the image given as input.

Jupyter Notebook 100.00%

color-extraction-and-image-segmentation's Introduction

Image-Segmentation

This repository introduces to my personal project, which explains and demonstrates the concept of segmentation of feature vectors according to the "Dominant Characteristic Feature" persistent in the image. The demonstration of the project was achieved by the application of "K-Means" Clustering algorithm, which is an unsupervised machine learning algorithm typically used for vector quantization and signal processing with data mining. This algorithm follows an iterative approach to segment or partition the dataset effectively, into K pre-defined clusters or overlapping sub-groups. The output obtained is the dominant color schemes demonstrated through graphical representation persistent in the image given as input.

Aim

The aim of the project, is to implement Clustering algorithm to extract dominant colors from the image and segment the image according to the dominant extracted colors persistent in the image.

Introduction

In color image processing and its applications the great importance is attached to the techniques used forimage segmentation. The quality of segmentation results have a big impact on the next steps of imageprocessing, for example on the object recognition and tracking, the retrieval in image databases etc. Thegoal of image segmentation is partitioning of the image into homogeneous and connected regions withoutusing an additional knowledge about objects in the image. The homogeneity of regions in color imagesegmentation involves in natural way colors and sometimes color textures. In the segmented image theregions have, in contrast to single pixels, many interesting features like shape, texture etc. The human beingrecognizes objects in the environment using his visual system and by the way he or she segments color images.

If an image after segmentation contains many small regions corresponding to homogeneous objects inthe original image, then we can use a new term: the oversegmentation. On the other hand, if an image aftersegmentation contains few large regions and each region corresponds to several objects in the original image,then this case can be named the undersegmentation.

Goal

The main goal of the project was to extract the dominant colors from the input image, and segment the image according to dominant colors persistent in the image ; and the extraction is achieved according to the segmentation of feature vectors in feature vector space, which could be either homogeneous or non-homogeneous.

Problem Statement

Random input image given by the user, given as the path of the image stored in the system as the parameter to the concerned function for segmentation.

Objectives

  1. Extract the dominant colors in the input image.

  2. Segment the image according to the dominant colors.

  3. Clustering must be independent of the input image, not concerned with the subject or format of the image.

Clustering Process

Clustering is the process of partitioning a set of objects (pattern vectors) into subsets of similar objectscalled clusters. Pixel clustering in three-dimensional color space on the basis of their color similarity is oneof popular approaches in the field of color image segmentation. Clustering is often seen as an unsupervisedclassification of pixels. Generally, the a priori knowledge about the image is not used during a clusteringprocess. Colors, dominated in the image, create dense clusters in the color space in natural way. Many different clustering tech-niques, proposed in the pattern recognition literature, can be applied to color image segmentation. Oneof the most popular and fastest clustering techniques is the k-means technique.

The results of segmentation by k-means depend on the position of initial cluster centers. In the case ofsemiautomated version of k-means the input data can be defined by human operator. In the case of automatedversion of k-means the initial centers can be choose randomly from all colors of the image. There exist alsoother possibilities for the choice of centers: k colors from the first pixels in the image, k gray levels fromthe gray line uniformly partitioned into k segments.

Significance of the Project

The process of partitioning a digital image into multiple segments is defined as image segmentation. Segmentation aims to divide an image into regions that can be more representative and easier to analyze. Such regions may correspond to individual surfaces, objects, or natural parts of objects. Typically image segmentation is the process used to locate objects and boundaries (e.g., lines or curves) in images. Furthermore, it can be defined as the process of labeling every pixel in an image, where all pixels having the same label share certain visual characteristics. Usually segmentation uses local information in the digital image to compute the best segmentation, such as color information used to create histograms or information indicating edges, boundaries, or texture information.

Color image segmentation that is based on the color feature of image pixels assumes that homogeneous colors in the image correspond to separate clusters and hence meaningful objects in the image. In other words, each cluster defines a class of pixels that share similar color properties. As the segmentation results depend on the used color space, there is no single color space that can provide acceptable results for all kinds of images. For this reason, many authors tried to determine the color space that will suit their specific color image segmentation problem . In this work, a segmentation of color images is tested with RGB classical color space.

Screenshots

Screenshot (74)

Screenshot (75)

Screenshot (78)

Screenshot (79)

Output

Screenshot (80)

Screenshot (81)

Screenshot (82)

Conlcusion

In this project work most of the attention has been concentrated on relatively simple image segmentation techniques(k-means clustering technique, region growing technique), that are a natural fit to incorporate into applica-tions. The influences of location of initial cluster centers and the number of iterations on the segmentationresults obtained from k-means technique have been investigated experimentally. Two versions of regiongrowing technique i.e. semiautomated seeded version and automated unseeded version have been describedin detail. It can be concluded that exist many possibilities of reasonable choice of seeds for seeded version.

color-extraction-and-image-segmentation's People

Contributors

ronny-22-code avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.