Codota Logo
RosPointCloudSubscriber$UnpackedPointCloud.getHeight
Code IndexAdd Codota to your IDE (free)

How to use
getHeight
method
in
us.ihmc.utilities.ros.subscriber.RosPointCloudSubscriber$UnpackedPointCloud

Best Java code snippets using us.ihmc.utilities.ros.subscriber.RosPointCloudSubscriber$UnpackedPointCloud.getHeight (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: us.ihmc/ihmc-perception

private synchronized void onNewPointcloud(RosPointCloudSubscriber.UnpackedPointCloud unpackedPointCloud)
{
 OrganizedPointCloud organizedPointCloud = new OrganizedPointCloud(unpackedPointCloud.getWidth(), unpackedPointCloud.getHeight(),
    unpackedPointCloud.getXYZRGB());
 ArrayList<LineModDetection> detections = new ArrayList<>();
 LineModDetection bestDetection = detectObjectAndEstimatePose(organizedPointCloud, detections,false,false);
 System.out.println(bestDetection);
 if (bestDetection != null)
 {
   BufferedImage image = organizedPointCloud.getRGBImage();
      Collections.sort(detections);
   for(int i=0;i<Math.min(detections.size(),3);i++)
   {
    drawDetectionOnImage(detections.get(i), image);
   }
   int heightOffset = frame.getHeight() - frame.getContentPane().getHeight();
   int widthOffset = frame.getWidth() - frame.getContentPane().getWidth();
   frame.setSize(image.getWidth() + widthOffset, image.getHeight() + heightOffset);
   imagePanel.setBufferedImageSafe(image);
 }
}
origin: us.ihmc/IHMCPerception

private synchronized void onNewPointcloud(RosPointCloudSubscriber.UnpackedPointCloud unpackedPointCloud)
{
 OrganizedPointCloud organizedPointCloud = new OrganizedPointCloud(unpackedPointCloud.getWidth(), unpackedPointCloud.getHeight(),
    unpackedPointCloud.getXYZRGB());
 ArrayList<LineModDetection> detections = new ArrayList<>();
 LineModDetection bestDetection = detectObjectAndEstimatePose(organizedPointCloud, detections,false,false);
 System.out.println(bestDetection);
 if (bestDetection != null)
 {
   BufferedImage image = organizedPointCloud.getRGBImage();
      Collections.sort(detections);
   for(int i=0;i<Math.min(detections.size(),3);i++)
   {
    drawDetectionOnImage(detections.get(i), image);
   }
   int heightOffset = frame.getHeight() - frame.getContentPane().getHeight();
   int widthOffset = frame.getWidth() - frame.getContentPane().getWidth();
   frame.setSize(image.getWidth() + widthOffset, image.getHeight() + heightOffset);
   imagePanel.setBufferedImageSafe(image);
 }
}
origin: us.ihmc/ihmc-perception

  @Override
  public void onNewMessage(PointCloud2 pointCloud)
  {
   UnpackedPointCloud cloud = unpackPointsAndIntensities(pointCloud);
   if (cloud.getWidth() > 1200)
   {
     int ptr = 0;
     Point3D[] points = new Point3D[(cloud.getWidth() / 2) * (cloud.getHeight() / 2)];
     Color[] pointColors = new Color[(cloud.getWidth() / 2) * (cloud.getHeight() / 2)];
     for (int j = 0; j < cloud.getHeight(); j += 2)
      for (int i = 0; i < cloud.getWidth(); i += 2)
      {
        points[ptr] = cloud.getPoints()[j * cloud.getWidth() + i];
        pointColors[ptr] = cloud.getPointColors()[j * cloud.getWidth() + i];
        ptr++;
      }
     UnpackedPointCloud scaledCloud = new UnpackedPointCloud(cloud.getWidth() / 2, cloud.getHeight() / 2, cloud.getPointType(), points, pointColors);
     onNewPointcloud(scaledCloud);
     return;
   }
   else
   {
     onNewPointcloud(cloud);
     return;
   }
  }
};
origin: us.ihmc/IHMCPerception

  @Override
  public void onNewMessage(PointCloud2 pointCloud)
  {
   UnpackedPointCloud cloud = unpackPointsAndIntensities(pointCloud);
   if (cloud.getWidth() > 1200)
   {
     int ptr = 0;
     Point3d[] points = new Point3d[(cloud.getWidth() / 2) * (cloud.getHeight() / 2)];
     Color[] pointColors = new Color[(cloud.getWidth() / 2) * (cloud.getHeight() / 2)];
     for (int j = 0; j < cloud.getHeight(); j += 2)
      for (int i = 0; i < cloud.getWidth(); i += 2)
      {
        points[ptr] = cloud.getPoints()[j * cloud.getWidth() + i];
        pointColors[ptr] = cloud.getPointColors()[j * cloud.getWidth() + i];
        ptr++;
      }
     UnpackedPointCloud scaledCloud = new UnpackedPointCloud(cloud.getWidth() / 2, cloud.getHeight() / 2, cloud.getPointType(), points, pointColors);
     onNewPointcloud(scaledCloud);
     return;
   }
   else
   {
     onNewPointcloud(cloud);
     return;
   }
  }
};
us.ihmc.utilities.ros.subscriberRosPointCloudSubscriber$UnpackedPointCloudgetHeight

Popular methods of RosPointCloudSubscriber$UnpackedPointCloud

  • getPoints
  • getPointColors
  • <init>
  • getIntensities
  • getPointType
  • getWidth
  • getXYZRGB

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now