Below is the c code for reading LiDar/LAS file into matlab. To compile the code, simply use
The code reads the points coordinates only. Please see the code for details.
For details of LiDar file format, please visit this link.
When you save a multiple plots/subfigures figure as an eps file in matlab, the bounding box might not be properly defined. People who use pdflatex need to convert EPS to PDF. The undefined bounding box will cause problems if you use epstopdf to convert EPS to PDF. This problem is shown in the first row in the picture below. The top-left figure is the eps file without properly defined bounding box. Because of this, epstopdf simply printed a letter size pdf file that only contains part of the figure as shown in the top-right figure. You can try to use the option –exact
epstopdf --exact bad.eps
It will probably generate an warning msg like “Warning: BoundingBox not found!” and the resulting pdf is still wrong. One way to fix this problem is to use epstool
epstool --copy --bbox bad.eps --output good.eps
The —bbox option tells epstool to generate a (correct) bounding box for the eps file. With a correctly defined bounding box, you can easily convert an eps file to a pdf file.
epstopdf --exact good.eps
The results are shown in the 2nd row of the picture below. epstopdf generated an pdf file in the same size as the eps file.
[v,ind]=max(X); [v1,ind1]=max(max(X)); disp(['The largest element in X is' num2str(v1) ' at (' num2str(ind(ind1)) ',' num2str(ind1) ')']);
images is an array of dim imageHeight x imageWidth x frameNumber
for i = 1:size(images,3) imshow(images(:,:,i)); title(['frame# ' num2str(i)]); drawnow; %// this is why it works end