Color-based Object Segmentation for Image Processing, Assignments of Digital Image Processing

This project entails exploring color-based object segmentation in image processing. It covers the theoretical and practical aspects of using various algorithms, color models, and image processing techniques to differentiate objects based on colors. The project aims to enhance students' understanding of imaging techniques, software usage, and algorithm application. The documentation includes a literature review on color models, justification for chosen models, and implementation details, leading to a software solution for object detection. The report encompasses objectives, color space rationale, critical analysis, and references, fostering knowledge in image processing and pattern recognition.

Typology: Assignments

2022/2023

Available from 08/23/2023

boda-mohamed
boda-mohamed 🇲🇾

2 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Table of Content
1. Introduction
1.1 overview
1.2 purpose
1.3 scope of object segmentation via colours
2. Fundamentals of colour spaces
3. Pre-processing and Image Acquisition
4. Colour Thresholding Techniques
5. Colour Space Conversion and Selection
6. Colour-Based Object Segmentation Techniques
7. Evaluation Metrics for Object Segmentation
8. Implementing in Python
The Objectives
1. Recognise and Remove Objects
2. Enhance Object Recognition and Detection
3. Reduce Computational Complexity
4. Enable object tracking and analysis
5. Enable Automated Visual Inspection
6. Facilitate Image Understanding and Interpretation
Description, discussion, and justification for the use of colour space
1. Description
2. Discussion
3. Justification for use
Critical comments and analysis
Conclusion
References
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Color-based Object Segmentation for Image Processing and more Assignments Digital Image Processing in PDF only on Docsity!

Table of Content

  1. Introduction 1.1 overview 1.2 purpose 1.3 scope of object segmentation via colours
  2. Fundamentals of colour spaces
  3. Pre-processing and Image Acquisition
  4. Colour Thresholding Techniques
  5. Colour Space Conversion and Selection
  6. Colour-Based Object Segmentation Techniques
  7. Evaluation Metrics for Object Segmentation
  8. Implementing in Python

• The Objectives

  1. Recognise and Remove Objects
  2. Enhance Object Recognition and Detection
  3. Reduce Computational Complexity
  4. Enable object tracking and analysis
  5. Enable Automated Visual Inspection
  6. Facilitate Image Understanding and Interpretation

• Description, discussion, and justification for the use of colour space

  1. Description
  2. Discussion
  3. Justification for use

• Critical comments and analysis

• Conclusion

• References

Table of Content: Object Segmentation via Colours

1. Introduction: The valuable computer vision technique known as object segmentation by colours enables the detection and extraction of objects based on their colour properties. By using colour information and appropriate colour spaces, we can create precise and reliable object segmentation, opening up possibilities for a range of applications in fields including robotics, augmented reality, medical imaging, and more. 1.1 Overview: A computer vision technique called object segmentation by colours aims to separate significant objects from the background using the properties of the objects' hues. Many applications, including object detection, tracking, and visual comprehension, depend on this fundamental function. The goal of object segmentation by colours is to automatically identify and separate objects from an image or video using differences in colour. It is based on the premise that objects of focus typically have distinctive or unique colour properties, as opposed to the background or other objects in the scene. 1.2 Purpose: The objective of object segmentation by colours is to automatically identify and extract objects of interest from an image or a video based on their colour characteristics. It plays a crucial role in computer vision tasks and applications that need the comprehension and analysis of visual content. . 1.3 Scope of Object Segmentation via Colours: The field of computer vision and image processing has many different sectors and applications that fall under the broad umbrella of object segmentation by colours. It is essential for jobs that call for the extraction and identification of items based on their colour characteristics. The domains of object detection and recognition, image and video analysis, medical imaging, augmented reality and virtual reality, robotics and automation, image editing, and forensics are all included in the purview of object segmentation by colours.

7. Evaluation Metrics for Object Segmentation: Evaluation metrics are critical for assessing the effectiveness of segmentation algorithms. They provide quantitative measures to evaluate the accuracy, completeness, and quality of the segmented objects in contrast to the ground truth annotations. 8. Implementing in Python: Object Detection def detect_objects(image): # Converting the image to HSV color space hsv_image = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) Color bound for yellow colour lower_bound = np.array([20,60,80]) upper_bound = np.array([30, 255, 255]) msk = cv2.inRange(hsv_image, lower_bound, upper_bound) Applying the masks to the original image obj1 = cv2.bitwise_and(image, image, mask=msk) obj2 = cv2.bitwise_and(image, image, mask=msk) Combine the results output = cv2.add(obj1, obj2)

Input: Output:

Description, discussion, and justification for the use of colour space

1.Description: A certain arrangement of colours known as a "colour space" allows for the systematic representation and understanding of colour. It establishes a mathematical foundation for defining how different hues relate to one another and provides a logical basis for doing so. For computer vision and image processing applications like object segmentation, colour spaces are essential.

2. Discussion: Representation of Colour Information: Colour spaces, which provide a uniform representation, are used to express colour information. They outline the encoding and decoding of colours, allowing us to precisely measure and regulate hues. Different colour spaces provide advantages in terms of perceptual consistency, colour gamut coverage, and encoding efficiency. Separation of Colour Channels: Colour information is typically divided into several channels by colour spaces, such as the RGB (Red, Green, and Blue) colour space. We can assess and utilise each component of a colour individually thanks to this split, which provides us greater control over color-related tasks. For example, separating colour channels can help with object segmentation by isolating items based on specific colour thresholds. Colour Transformations: Colour spaces allow for colour conversions between different representations. This transformation may be used to modify colour information to suit particular requirements or to take variations in lighting into consideration. For instance, converting a photograph to a perceptually uniform colour space, like CIELAB or CIELUV, might enhance colour discrimination and simplify segmentation tasks. 3. Justification for Use: The selection of colour space for object segmentation is influenced by the characteristics of the objects, the lighting, and the required degree of segmentation accuracy. Here are a few justifications for using colour spaces in object segmentation. Discriminative Power: Better colour discrimination is provided by some colour spaces, such as LAB or HSV, making it easier to distinguish objects from the background. The accuracy of object segmentation is improved, and the likelihood of classification errors is decreased, thanks to this discrimination capacity. Simplified Thresholding: When using specific colour spaces, such LAB or HSV, which allow for better colour discrimination, it is easier to distinguish objects from the backdrop. Thanks to this discrimination power, object segmentation accuracy is increased and classification errors are less likely.

Colour Invariance: HSV or LAB colour spaces are examples of colour spaces that can be more resistant to changes in illumination or fluctuations in colour intensity. Across various environments and lighting conditions, this invariance trait enables more accurate object segmentation. Compatibility with Existing Algorithms: It's possible that some computer vision or image processing algorithms have been created and optimised for particular colour spaces. In these situations, utilising a comparable colour space can make it easier to include current techniques into the pipeline for object segmentation. Application-specific Requirements: For a particular use, there might be particular colour constraints or specifications. For instance, medical imaging typically uses the HSI (Hue, Saturation, and Intensity) colour space to highlight specific tissue features. The selection of a particular colour space for object segmentation can be supported by adhering to certain application-specific standards. Finally, while selecting a colour space for object segmentation, it is important to consider factors including discriminative power, colour invariance, threshold simplicity, algorithm compatibility, and application-specific requirements. Understanding the characteristics and advantages of different colour spaces will help with choosing the right colour space for effective object segmentation.

Critical comments and analysis

Colour spaces are essential for computer vision tasks like object segmentation, but it's important to assess their drawbacks and consider other approaches. The examination and criticism of the use of colour spaces are as follows: Sensitivity to Lighting Conditions : RGB is one of many colour schemes that is very sensitive to variations in lighting. Given that variations in illumination can have a significant impact on colour values, segmentation based on colour is less trustworthy. Only using colour spaces in these situations would not be sufficient; alternative techniques like light normalisation or multi- modal segmentation might be needed. Limited Discrimination Power : Different objects with identical colour appearances might not be able to be distinguished by some colour spaces, especially RGB. When objects have overlapping colour distributions or when the background has hues that are similar to the objects of interest, segmenting them only using colour spaces may be inaccurate. By adding more factors like texture, shape, or contextual information, accurate segmentation can be improved. Object Variability and Colour Appearance : Depending on the angle, occlusions, shadows, or texture patterns used to photograph an object, it may appear to have a different colour. Since colour spaces might not be able to properly capture these distinctions, relying just on colour information could lead to segmentation that is insufficient or inaccurate. Combining color-based segmentation with other techniques like edge detection, texture analysis, or machine learning- based algorithms can help solve these problems.

Conclusion

In conclusion, colour-based object segmentation is a useful tool for computer vision and image processing jobs. It seeks to recognise and extract interesting things based on their colour characteristics. We can represent and understand colours in a structured and methodical fashion using colour spaces, enabling quantitative analysis and manipulation. However, it's crucial to evaluate the shortcomings of color-based segmentation critically. The accuracy and dependability of segmentation results might be impacted by elements like lighting circumstances, low discrimination power, object variability, and colour interactions. To overcome these difficulties, it is vital to think about different strategies and include other aspects like texture, shape, contextual data, or sophisticated colour models. The selection of colour space is very important and is determined by the particular needs of the application and the traits of the objects being segmented. To increase segmentation accuracy, it is crucial to assess several colour spaces and maybe investigate hybrid strategies that combine various colour spaces or incorporate other image information. In order to achieve more reliable and accurate object segmentation, it is also crucial to take contextual information, noise management, and complicated objects into account. In conclusion, while colour-based segmentation is a helpful technique, it should be used in conjunction with other techniques and features to get around its drawbacks and improve the accuracy and reliability of object segmentation.

References

Szeliski, R. (2010). Computer Vision: Algorithms and Applications. Springer. Gonzalez, R. C., & Woods, R. E. (2017). Digital Image Processing. Pearson. OpenCV Documentation. (n.d.). Image Thresholding. Retrieved from https://docs.opencv.org/4.5.3/d7/d4d/tutorial_py_thresholding.html OpenCV Documentation. (n.d.). Image Segmentation with Watershed Algorithm. Retrieved from https://docs.opencv.org/4.5.3/d3/db4/tutorial_py_watershed.html OpenCV-Python Tutorials. (n.d.). Retrieved from https://opencv-python- tutroals.readthedocs.io/ Rosebrock, A. (2017). Image Thresholding with OpenCV and Python. Retrieved from https://www.pyimagesearch.com/2017/02/13/opencv-automatic-license-plate-recognition- anpr-with-python/ Image Segmentation with Python and OpenCV. (n.d.). Retrieved from https://www.analyticsvidhya.com/blog/2019/04/introduction-image-segmentation- techniques-python/ Giordano, D., Girardi, M., & Leo, M. (2014). Color image segmentation techniques: a survey. Color Research & Application, 39(6), 640-654. Khan, S., & Noreen, M. (2018). Image segmentation based on color analysis using python. International Journal of Engineering and Advanced Technology, 8(6), 480-484.