Borrar filtros
Borrar filtros

Create VLC-Receiver with Video-Input (CMOS Camera) by ROI detection and analyzing Black/White Stripe Pattern

2 visualizaciones (últimos 30 días)
Part-1:
Dear Community,
as part of a project, I would like to create a transmission system based on Visible Light Communication (VLC). This question is related to the receiver side:
Setup and objectives: I connect a smartphone as an IP camera to a computer and want to interpret the video signal in MATLAB as binary code. The video signal contains a encoded black and white stripe pattern as the photo with the two distance scenarios shows:
LED captured with CMOS
What becomes visible at first glance is that the stripe pattern unfortunately gets wider and wider towards the edges until it disappears into the black. This is one reason why I want to use the stripe width vertically in the middle of a detected circle around the LED referred to as ROI 1. The data packet itself lies between two wider black stripes and is marked with the yellow frame as ROI 2.
Question 1: Surely you have a lot of experience with MATLAB and knowledge about what is possible, maybe someone even has experience in the context of Visible Light Communication. Perhaps you can tell me about any App in MATLAB, function or in the best case examples that can support me in my project?
In my initial research, I am exploring the Apps: Lidar Toolbox, Digital Image Processing (Chandurkar) as possibly helpful and I am currently studying how to cut out ROI 1 with them.
Question 2: Actually, I wanted to use image processing to determine the distance between the stripes in ROI 2. But today I read that the frequency of the stripe pattern can be clearly identified in the frequency spectrum. However, according to a publication an FFT determines the frequency somewhat inaccurately. Has anyone had experience with whether a FFT is suitable for such a project or can provide alternatives?
I know that my questions are currently still very general. This will certainly change in the course of the project. Some things are not yet so clear to me, so I am quite interested in examples from the area of ROI detection and recognition of stripe patterns.
.....................................................................................................................................................................................................
Part-2: (21 April 2021)
Because my questions have remained unanswered so far, I have produced concrete code in the meantime. My previous questions 1 & 2 are still current, but new questions have arisen:
It doesn't seem to be that easy after all. To detect the position of the led lamp in the image (i.e. ROI 1), I tried the following code:
1 %% Original Image
2 rgbImage = imread('vlc_6.jpg');
3 figure(1), imshow(rgbImage);
figure(1)
4 %% Transform HSV ColorSpace
5 hsvImage = rgb2hsv(rgbImage);
6 vImage = hsvImage(:,:,3);
7 figure(2), imshow(hsvImage);
figure(2)
8 %% Thresholding
9 valueThresholdLow = graythresh(vImage);
10 valueThresholdHigh = 1.0;
11 valueMask = (vImage >= valueThresholdLow) & (vImage <= valueThresholdHigh);
12 figure(3), imshow(valueMask, []);
figure(3)
13 %% Filling Holes of Circles
14 fillImage = imfill(valueMask,'holes');
15 figure(4), imshow(fillImage);
figure(4)
16 %% Detecting Circles
17 Rmin = 50;
18 Rmax = 750;
19 [centersDark, radiiDark] = imfindcircles(fillImage,[Rmin Rmax],'ObjectPolarity','dark','Sensitivity',0.95,'Method','twostage');
20 circleImage = viscircles(centersDark, radiiDark,'Color','b');
21 figure(5), imshow(circleImage);
Figure (5) could not be displayed. the following error message appeared:
Error using imageDisplayValidateParams
Expected input number 1, I, to be one of these types:
numeric, logical
Instead its type was matlab.graphics.primitive.Group.
Error in images.internal.imageDisplayValidateParams (line 11)
validateattributes(common_args.CData, {'numeric','logical'},...
Error in images.internal.imageDisplayParseInputs (line 78)
common_args = images.internal.imageDisplayValidateParams(common_args);
Error in imshow (line 246)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
New questions:
Question 3:
Why are circles shown in figure (4), even though the function for displaying cicles is only called afterwards?
Question 4:
How can I detect small circles (approx. 1/4 of the image height) and very large circles that are even outside the image?
Question 5 (similar Question 2):
The goal is still to cut out the yellow rectangle (ROI-2) between two thick black bars. It doesn't matter which thick black bars. However, as close as possible to the center, the lines seem to be most clearly visible. Do you know ways to cut out ROI-2 (yellow rectanlge)?
ROI-2
I hope you could help me. Thank you for your time

Respuestas (0)

Categorías

Más información sobre C4ISR en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by