Point Cloud data segmentation and sub-analysis
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone,
bit of a complex one here.
I have a point cloud of (x,y) points, each with a speficic intensity attached to it. This point cloud is generated from a signal which I also have access to. I essentially would like to be able to analyse this data to determine things like individual average "grain" size, or the average intensity for a specific "grain" or sub-area. To do this, I figured there were two ways. The first would be to work on the signal itself, which would be complicated, and the second would be to go the image processing route, to smooth out and identify "grains", but that would sever my connection with the actual data.
So, I'm trying to understand:
- are there signal filtering methods which would produce a point cloud which looks something like a Kuwuhara filter being applied on an image file, but which are applied to a signal rather than an image?
- if I did go the image analysis route, and then tried to link it back to the original data, is there an automated way to apply a 2D image mask to live plotted data, and determine what points fit within each specific "grain" on the image mask?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1103150/image.png)
I have included an example of the workflow I am trying to describe, above. A) is the signal received. B) is the point cloud obtained colormapped to each point's "intesity". C) is a greyscale intermediate produced with some mild filtering and D) is the Kuwahara filter at work to make the grains more obvious. The red lines have, in this case, been drawn out by hand. The idea is to be able to run a sort of edge detection algorithm but on live data as if it were an image, OR run it on the image of the point cloud, but then find some way to relate the mask created, to the live data, so as to create a sort of interractive map of sub-areas ("grains"), the points within which can then be summed and displayed as analysed data.
Essentially the core issue is that there is a lot of great algortihmic methods to do stuff like edge detection, but those all work in the image analysis space (which is all RBG). If I moved into that space, I need to know if there is a way of moving back into the actual data space the image is a poor representattion of (by means of using a 2D mask to segment live point cloud data).
Things I've looked into have been stuff like super-pixels, or boundary but any suggestions would be most welcome.
Thanks again everyone!
0 Kommentare
Antworten (1)
Shivansh
am 7 Feb. 2024
Bearbeitet: Shivansh
am 7 Feb. 2024
Hi Dennis!
It seems like you are trying to achieve grain analysis in a point cloud while preserving the connection to the original signal data.
For the signal filtering method, you can use a similar approach to Kuwahara filter for signal data. It will involve segmenting your (x,y) point cloud into local neighborhoods and then applying a filter that considers the variance or other statistical properties within these neighborhoods.
If you try with image analysis route, you can convert your point cloud to an image and use image processing techniques. You will get a binary mask of your grains after applying the Kuwahara filter and performing edge detection. The obtained binary mask can be used to segment your original point cloud data. You can refer to the following Matlab code to segment the original cloud data.
% Assuming 'binaryMask' is the mask obtained from image processing
% 'xRes' and 'yRes' are the resolutions of the grid that you used to create the image from the point cloud
% Convert point cloud (x, y) coordinates to image indices
colIndices = round(pointCloud(:,1) / xRes);
rowIndices = round(pointCloud(:,2) / yRes);
% Ensure indices are within the image bounds
colIndices = max(min(colIndices, size(binaryMask, 2)), 1);
rowIndices = max(min(rowIndices, size(binaryMask, 1)), 1);
% Find which points are within the grains
indicesWithinGrains = sub2ind(size(binaryMask), rowIndices, colIndices);
pointsInGrains = binaryMask(indicesWithinGrains);
% Now 'pointsInGrains' is a logical array with 'true' for points within grains
% You can use this to filter your original point cloud data
filteredPointCloud = pointCloud(pointsInGrains, :);
You can refer to the following Matlab documentation to know more about "sub2ind": https://www.mathworks.com/help/matlab/ref/sub2ind.html.
I hope it helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Point Cloud Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!