Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supervoxel example updates #915

Merged
merged 2 commits into from
Sep 18, 2014

Conversation

jpapon
Copy link
Contributor

@jpapon jpapon commented Sep 17, 2014

Added better messages to explain single camera transform, fixed bug where negative Z values were always abs'd, even if transform disabled.
Added ability to use normals provided within point cloud, and ability to disable this.
Adjusted visualization so voxels and supervoxels are displayed better.
Cleaned up command line parsing.

if (!disable_transform)
{
for (PointCloudT::iterator cloud_itr = cloud->begin (); cloud_itr != cloud->end (); ++cloud_itr)
if (cloud_itr->z < 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should throw out z == 0 as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but didn't include it because of those files we encountered a while back where people were putting points at (0,0,0) instead of nan. log(z) "converts" those points to nans =)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also remembered those files! But you are right, log(z) does the right thing for them.

@taketwo
Copy link
Member

taketwo commented Sep 17, 2014

On a separate note, what do you think about removing getColoredCloud() from supervoxel segmentation once #849 is merged?

@jpapon
Copy link
Contributor Author

jpapon commented Sep 18, 2014

On a separate note, what do you think about removing getColoredCloud() from supervoxel segmentation once #849 is merged?

We definitely should, we can remove the same from LCCP segmentation as well, but I think there's one piece missing before we can. We either need a savePNGFile overload for PointXYZL that lets you colorize the output, or better yet, a general colorize function that creates a new cloud with the RGB field added.

@taketwo
Copy link
Member

taketwo commented Sep 18, 2014

We either need a savePNGFile overload for PointXYZL that lets you colorize the output

This is already available, though it uses COLORS_MONO. I will augment #849 to make COLORS_GLASBEY the default value, which makes more sense.

better yet, a general colorize function that creates a new cloud with the RGB field added.

Maybe. Any suggestions on the signature, name, and location of such a function?

@jpapon
Copy link
Contributor Author

jpapon commented Sep 18, 2014

This is already available, though it uses COLORS_MONO.

Oh, I didn't see that. savePNGFile has different behavior for labeled points though, it saves them as 16-bit single channel images.

Maybe. Any suggestions on the signature, name, and location of such a function?

It's not really needed if there's already a write PNG function.

@taketwo
Copy link
Member

taketwo commented Sep 18, 2014

it saves them as 16-bit single channel images

Yep, this I will change.

taketwo added a commit that referenced this pull request Sep 18, 2014
@taketwo taketwo merged commit e80b64a into PointCloudLibrary:master Sep 18, 2014
@jpapon
Copy link
Contributor Author

jpapon commented Sep 18, 2014

Yep, this I will change.

Just to be sure - we need to keep both available. Saving the label as a single channel is useful for benchmarking.

@taketwo
Copy link
Member

taketwo commented Sep 18, 2014

Unfortunately with the current interface only one option can be conveniently exposed through savePNGFile(file, cloud, field) function.

But other options are still accessible, though you'll need to write some code, e.g.:

PointCloudImageExtractorFromLabelField<PointT> pcie (COLOR_MONO);
pcl::PCLImage image;
pcie.extract (cloud, image);
savePNGFile (file_name, image);

So which one should be the default you think? Mono or colorful?

@jpapon
Copy link
Contributor Author

jpapon commented Sep 18, 2014

Oh, I didn't even see that new interface. I think Mono makes the most sense logically, but I'm split. Maybe put a note in the doxygen comments with the code snippet showing how to colorize labels?

@taketwo
Copy link
Member

taketwo commented Sep 18, 2014

Agreed, makes sense to increase awareness of the various "extractors" that are now available.

@jpapon jpapon deleted the supervoxel_example_fix branch September 22, 2014 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants