Crop a PolygonMesh in PCL - crop

I want to crop a PolygonMesh created with Poisson reconstruction using the Point Cloud Library (PCL).
For point clouds this isn't a problem using the CropBox or CropHull filters.
However, these filters don't accept PolygonMesh as input type.
Is there anything that I'm missing or an easy solution to my problem?

Related

Drawing an image of PSF with custom radial profile in GalSim

I have a radial profile of a point spread function (PSF) that I want to draw in GalSim, so that I can call FindAdaptiveMom on the resulting image. The profile is in units of normalized intensity vs. angular position in arcseconds. I have looked at the instructions for building a custom object, but am wondering if it's possible to render a GalSim Image without building an object? If not, would it be possible to build an object simply by reading in the profile?
Unfortunately, it's not currently very easy to roll your own custom profile in GalSim. The instructions you pointed to would require the output to still be generated in terms of existing galsim types, so not really what you're looking for.
I think you have two options:
If all you care about is the FindAdaptiveMom bit and you don't want to do anything complicated with the rendering, you can lay down the radial profile yourself. An image is mostly just a wrapper around a numpy array and a bounds (defining what coordinate the origin of the array is). So you could write that array yourself and then make an image from that with im = galsim.Image(array) and call FindAdaptiveMom on that.
If you want your radial profile to be the true surface brightness profile on the sky (rather than as seen on an image) and then properly render it including integration over the pixels, then that's a little trickier. You can coerce GalSim into doing that by doing the above rendering first, and then make a galsim.InterpolatedImage object out of that, which will treat the drawn image as a surface brightness profile, which can then be drawn in the usual way (drawImage).

finding length of object in image

As a part of our project we have to find the dimensions of a given object in a particular image ex- dimensions of a given sunken ship which is underwater. This is totally new to me so my friend told me that in matlab its possible. Kindly help me out
I think you should look into image blobs and Edge detection. That's where I would start
Are you already set on MatLab? If you can use C#, I would look into: AForge.NET Image processing library for C#:
http://www.aforgenet.com/projects/iplab/
I have used AForge before to identify "blobs" in images and perform other image processing operations.
If you have still not finalized on Matlab, then AForge.NET or Magick.NET from ImageMagick can be tried.
To identify the dimensions of the image, we have to think thru the manual process of identifying the same. How are we able to identify ship in water from an image? How is the object different from sorrounding area in the image?
From that, you may try to identify ship as a blob and work on the blob. Sometimes, you may not be able to identify ship as blob, probably due to noise of the sorrounding. Find means to remove that noise or differentiate the object further from sorrounding by errosion or dillation or combination.

Pcl object reconstruction

I have a square table with four cameras (Xtion pro), one at each angle.
I'm trying to reconstruct the complete point-cloud of an arbitrary object that is on the table.
I've calibrated the cameras. Intrinsic parameters with a chessboard, and estrinsic parameters with a tag like ARToolkit.
The problem is that when I transform the point-clouds from camera's frame to the tag-defined frame I have errors, quite big.
How can I correct this error? I tried registration with ICP with poor results.
How can I use the obtained transformed cloud as initial guess for a fine registration?
Any suggestion is appreciated!
Edit after D.J.Duff comment:
I'm using Xtion PRO version without the RGB camera. So I'm calibrating the IR camera. To do so I covered the IR projector and performed the calibration with the IR stream with the ready to use ROS calibration tool for intrinsic parameters and the PiTag tags to calibrate extrinsic parameters.
I should manually align the cloud with a known object, but can this be automated? In sense: if I use something like an L-shaped object with no orientation ambiguities, can I automate the registration process to obtain a better transform matrix?

what are the image formats that can be used to create a texture in opengles?

I had recently starting learning openGLES and right now I had gone through some tutorials,so when I had come across the texture mapping concept am having a doubt that what are all the image formats we can use to create a texture.
Most image formats need conversion before they can be used as textures. There are libraries (e.g., DevIL) to handle that though. Without something to handle the conversion, the answer is basically "none". With DevIL, the answer becomes "nearly anything."

Display Image over map layer in GeoServer

I am newbie when it comes to GeoServer and trying to figure out if there is an easy way to display images on top of map layer.
A background: In my application, based on a search criteria, some polygons are drawn on the map. Each polygon has a corresponding image (in TIFF format) that is stored somewhere. I want to load the image on top of the map when the user zooms in to a certain zoom level.
I know this can be done using openLayers but since my images are in TIFF format, (openLayers is not able to render TIFF images as far as i know) i have to convert them to .PNG first which would be very slow considering the number of images i have.
Hence I was wondering whether it would be possible to create a image layer that would retrieve an image of a certain polygon at a certain zoom level. If so, could anyone point me to an example or give me an idea on whether this is possible.
I am using spring 2.5, tomcat 5, java 1.6 and geoserver 2.0
Thanks.
GeoServer's styling language, SLD, supports using an image file to provide the fill texture when rendering polygons. If the number of polygons that you want to handle is small, you could just set up a style rule for each polygon with its own image URL for the fill. Otherwise, I'd recommend establishing a formulaic mapping from data attributes to image URLs, and using GeoServer's dynamic symbolizer feature to reference the images.

Resources