- Generated and recovered WLAN protocol packets
- Generated and recovered 5G NR protocol packets (requires 5G Toolbox™)
- Generated and recovered Bluetooth low energy (LE) link layer (LL) packets (requires Bluetooth® Toolbox)
how to save pcap file after extracting groud plane
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Pavan Kumar B N
el 5 de Jun. de 2021
Respondida: Harsh Sharma
el 24 de Nov. de 2024 a las 18:34
Hello,
I extracted ground data using 'segmentGroundFromLidarData(ptCloud)' form 3D lidar (Velodyne) data. How to save ground segmented data as a pcap file to use for the further process?
I tried to save using as below but it is not working out.
save('pointCloudTest.mat','ptCloud')
save GroudData.pcap groundPtsIdx
Please find the code:
veloReader = velodyneFileReader('lidar.pcap','VLP16');
for i = 1 : 597
% Read current frame.
ptCloud = veloReader.readFrame(i);
% Create label array.
colorLabels = zeros(size(ptCloud.Location,1),size(ptCloud.Location,2));
% Find the ground points.
groundPtsIdx = segmentGroundFromLidarData(ptCloud);
% Map color ground points to green.
colorLabels(groundPtsIdx (:)) = greenIdx;
% Map color nonground points to red.
colorLabels(~groundPtsIdx (:)) = redIdx;
%save('pointCloudTest.mat','ptCloud')
%save GroudData.pcap groundPtsIdx
view(player,ptCloud.Location,colorLabels)
end
0 comentarios
Respuestas (1)
Harsh Sharma
el 24 de Nov. de 2024 a las 18:34
Hi Pavan,
PCAP is a file format used to store network packet data captured over a network. In MATLAB only the following packet types can be written to a PCAP file using the “pcapWriter” function:
You may refer to the following documentation for “pcapWriter” function - https://www.mathworks.com/help/wlan/ref/pcapwriter.html
The output from the “segmentGroundFromLidarData” function is a logical matrix which cannot be written to a PCAP file in MATLAB. You can save the “groundPtsIndex” matrix to another format using the “writematrix” function. Please refer to the following documentation to understand more about the “writematrix” function- https://www.mathworks.com/help/matlab/ref/writematrix.html
0 comentarios
Ver también
Categorías
Más información sobre Point Cloud Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!