Sticker Segmentation and Classification
Datalogic Coding Challenge
Problem Statement
You are provided with a dataset of 50 grayscale images. Each image contains two stickers affixed to a cardboard
background:
• Sticker 1: Contains a barcode
• Sticker 2: Contains shipping symbols
Your task is to develop an image processing pipeline that accomplishes the following:
1. Segmentation
Implement, and discuss the pros and cons of, at least TWO separate methods that will each segment each image into
three distinct regions:
• Dark: The printed content on the stickers
• Light: The sticker background
• Gray: The cardboard background
For the methods start with a modified version of Otsu’s algorithm for determining a threshold but note that you’ll
have to adapt this method to choose two thresholds, not just one. Then go ahead and implement and discuss at least
one other method.
2. Sticker Localization
Identify the extent of each of the two stickers in each image as a rotated bounding rectangle around the “Light”
regions of each image.
Datalogic USA, Inc.
959 Terry Street | Eugene | OR 97402 | United States of America
Tel. (1) 541-683-5700 | Fax. (1) 541-345-7140 | [Link]
Datalogic Confidential Internal
Page 1 of 2
3. Sticker Classification
Determine whether each sticker is a barcode or contains shipping symbols. You should use the segmented dark
regions for classification. Consider techniques like shape feature descriptors, or machine learning approaches.
Evaluate the quality and tradeoffs of your two segmentation methods with respect to classification accuracy,
robustness, and computational resources.
Evaluation Criteria
Your solution will be evaluated based on the following:
• Segmentation Accuracy: How well the algorithm separates the image into the three distinct regions
• Localization Accuracy: How accurately the sticker bounding boxes are identified
• Classification Accuracy: How well the algorithm distinguishes between barcodes and shipping symbols
• Code Quality: Readability, efficiency, and adherence to best practices
• Creativity and Innovation: Use of novel or advanced techniques
Dataset
You will be provided with a zip file containing the 50 grayscale images.
Deliverables
1. Python Code: Well-documented Python code implementing your solution
2. Results: A report summarizing the accuracy of your segmentation, localization, and classification (specifically
report the percentage of correct classification)
3. Explanation: A clear explanation of your approach, including the rationale behind your chosen techniques
and any optimizations you made
Additional Notes
You are free to use any libraries or frameworks you deem appropriate (e.g., OpenCV, scikit-image) with the caveat
that the core implementation of the segmentation algorithm must be your own work. You may use libraries for
auxiliary tasks like image loading, visualization, or other pre/post-processing steps.
Be prepared to discuss the potential limitations of your solution and how it could be improved.
Bonus Challenge
Describe, without implementing it, how your solution could be adapted to handle:
• Stickers of varying sizes and shapes
• Images with different lighting conditions
• Images with more than two stickers or with other objects present