Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9160377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:43:30+00:00 2026-06-17T13:43:30+00:00

I have a huge 3D pointcloud, [3x40e6]. It’s a pointcloud of a flat surface,

  • 0

I have a huge 3D pointcloud, [3x40e6]. It’s a pointcloud of a flat surface, so it’s more like 2.5D in that sense. I would like to bin the pointcloud into a fixed mesh range so that i can just put it into a 2D matrix and view it with imagesc(mymap).

I did solve this problem, but it takes too long. This is what i got so far. It works fine but takes 10 minutes. It interpolates all kind of jive and i don’t need that.

xlin=linspace(min(xx),max(xx),meshsz*dxxyy);
ylin=linspace(min(yy),max(yy),meshsz);
[X,Y]=meshgrid(xlin,ylin);
disp('+ Flattening (X,Y,Z) information into 2D (X,Y)(Z) mesh..')
%Fit to 2D grid (takes a long time)
Z=griddata(xx,yy,zz,X,Y);%,'cubic');

What i would really want to do is bin all the data from my [3xN] vector into my specific 2D range map. I guess i would have to bin all the values into that map (there are some excellent and fast binning algorithms) but i would also need the specific Z-coordinate scalars in there because that’s what i want to average in each bin.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:43:31+00:00Added an answer on June 17, 2026 at 1:43 pm

    Solved. Takes 200ms per million points.

    yidx=[min(yy):dy:max(yy)];
    xidx=[min(xx):dx:max(xx)];
    ZmapSum=zeros(length(yidx),length(xidx));
    ZmapIdx=zeros(size(ZmapSum));
    
    [nx,binx] = histc(xx,xidx);
    [ny,biny] = histc(yy,yidx);
    %bin==0 means the value is out of range
    binx=binx+1; biny=biny+1;
    %binzero=( (binx==0) | (biny==0) );
    %binx(binzero) = [];
    %biny(binzero) = [];
    %xx(binzero) = [];
    %yy(binzero) = [];
    %zz(binzero) = [];
    
    %binx and biny give their respective bin locations
    for i=1:1:length(xx)
        ZmapSum(biny(i),binx(i))=ZmapSum(biny(i),binx(i))+zz(i);
        ZmapIdx(biny(i),binx(i))=ZmapIdx(biny(i),binx(i))+1;
    end
    
    Zmap=ZmapSum./ZmapIdx;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a huge checkbox list with different levels and I would like to
I have a huge java codebase (more than 10,000 java classes) that makes extensive
I have huge table with 1 million records, i would like to modify some
I have huge dictionaries that I manipulate. More than 10 Million words are hashed.
Im getting back into database design and i realize that I have huge gaps
I don't know whether this question makes sense or not. I have huge amount
I have huge tables ( 3 millions records ) that must have a joined
I have huge data in a directory tree format like: c:/user/name/class/std/section I to VI
i have huge project that contains around 200 jars, when i prepare release maven
i have huge data in xlsx format and i want to dump that data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.