2

We have a technical task to recognize coal on the conveyor.

Input data: Photo of conveyor with (or without) coal.
Output data: Processed image with conveyor borders. (next step is recognizing volume of coal on the conveyor)

We've tried to process image to black/white, increasing contrast, blurring, but there's too much "noises" on the image. That is the first question: how to get rid of unwanted pixels on the image?

And the second question: how to properly detect conveyor (and then coal on it) on image?

Example of source image:

enter image description here

Venkatesh Wadawadagi
  • 2,793
  • 21
  • 34
Ilya G
  • 329
  • 3
  • 8
  • @llya i also had similar challenge in my final year college project(Mining engineering), i had used the HSV color model and edge based information along with some heuristic parameters to segment the coal region which gave me descent output. – flamelite Apr 24 '18 at 10:00
  • what problem are you trying to solve. this sounds like pretty bad engineering. – Piglet Apr 24 '18 at 10:17
  • Were you able to solve the task? If so, how did you do it at the end? It will be good to see your approach... – Asterisk May 03 '18 at 07:46
  • Current abilities and final aims were revised. We came up to this result: solve this problem only with a camera really is not the smartest thing to do. We decided to use ultrasonic sensor to determine level of coal on the conveyor. Thank you all for help! – Ilya G May 03 '18 at 12:55

2 Answers2

3

Not sure if this helps, but you can try finding triangular shaped region using Hough transform.

Below is the example:

  1. Load and convert the image to gray
  2. Threshold and apply thinning
  3. Fit Hough transform

For example,

import cv2
from skimage import morphology

# Load image and convert to gray
img = cv2.imread('test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# Otsu threshold
t, thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)

# Apply thinning    
thin = morphology.thin(thresh)
show_img(thin, 'Thinned')

# Hough transform: experiment with params here
from skimage.transform import probabilistic_hough_line

lines = probabilistic_hough_line(thin, threshold=100, line_length=10, line_gap=20)
print('Total lines={0}'.format(len(lines)))

# Plot lines over the input image
for p1, p2 in lines:
    cv2.line(img, p1, p2, (255, 0, 0), 4)

Images: enter image description here enter image description here enter image description here

Asterisk
  • 3,534
  • 2
  • 34
  • 53
0

Ask yourself why you want to solve this with a camera. There's like a houndred better, cheaper and more reliable ways to detect if there is coal on the conveyor. unless there can be something else or you want to get further information about that coal.

light barriers, point, line or areal distance-sensors (ultrasonic, optical,...) tactile switches, microphones, load cells, ...

If you insist on using cameras you have another ton of options which will depend on what exactly you want know.

The simplest straight forward approach is to check wether the conveyor looks empty rather than detecting the coal itself.

Also why do you have to detect the conveyor? I doubt it will walk away after you've installed your camera.

Piglet
  • 27,501
  • 3
  • 20
  • 43
  • 1
    No conveyor belt follows fixed continuous cyclic path so it will not walk away at any time by itself :P. And i guess OP wants to segment the coal region in the end and calculate its volume. – flamelite Apr 24 '18 at 10:22