How can I detect the dark black socket from the dark or very reflective bacground?

4 ビュー (過去 30 日間)
I need to detect the CCS2 connector of electric cars. It is very dark, with dark and poor textures.
I have some results with intensity transformations using imadjust and gamma correction when I am deparating the connector from the background. Later, I am using morphology.
Still, when I place the camera little far from the connector, 40cm-50cm the image spoils, and the detection fails, specially at daylight. The detection from 20-25cm is 100%.
I am using ZED2i depth camera and diffuse light sources, but the depth image is very poor due to the socket texutes, and now first I need to detect the connector position from the color image.
I would like to use image processing techniques, not deep learning if it is possible (I was thinking about RCNN network, or mask-RCNN, but I can not find the detail description how can I make the training with my own data/images).
I have attached the images too.
Please, any suggestion to improve the detection from 50cm distance (the greater distance would more better).
Naturally, a new camera could help, but the goal is to generate the depth image too, not only the color image.
  2 件のコメント
L 2022 年 8 月 2 日
Hello Mathias,
No, there is no option to crop the image.
The goal is to record the image from about 50cm and detect/extract the connector.
Also, the detection should work with various illumination conditions (daylight, artificial light, etc.)



Image Analyst
Image Analyst 2022 年 8 月 3 日
imadjust won't help. Increasing global brightness or contrast will not help with segmentation. Just think about it and you should know why.
Local contrast enhancement like with adapthisteq or imlocalbrighten might help.
If the connectors are of the same type, you might be able to use normalized cross correlation to find them. Demo attached. But it will depend on the template having the same size as the connector, which is unlikely from images collected from the field.
Otherwise if you had hundreds of photos and wanted to label them all with ground truth of known connector pixels, then you could use segnet.
  14 件のコメント
L 2022 年 8 月 10 日
This is the example with a silver (alu-foil) background. The socket is illuminated with the same hand lamp as before, however now the sunlight is affecting the scene from the left side. The results of the adaptive thresholding and the Sobel edge detector are shown in the sample images.
The possible solution is to illuminate the socket in dark. However, is it possible to separate and extract the socket from this kind of input image (to get the mask of the socket)?
Possibly this is one of the worst cases.


その他の回答 (1 件)

Mathias Smeets
Mathias Smeets 2022 年 8 月 3 日
I don't know a specific solution.
However, here is a link that might help. I had a similar (easier) problem and I tried out a lot of different things on this link under 'segmentation techniques'.
Another thing you might try is using the functions imadjust (for enhancing contrast) and imlocalbrighten (for brightening) before you do the actual processing.
  4 件のコメント
L 2022 年 8 月 3 日
I have attached now the images.
The file names explaine the images.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by