Skip to content

Instantly share code, notes, and snippets.

@xiangxw
xiangxw / png2pcd.sh
Created May 20, 2014 08:15
convert two png files(color and depth) to a pcd file. dataset: http://rgbd-dataset.cs.washington.edu/dataset/rgbd-scenes/. pcl pull request:https://github.com/PointCloudLibrary/pcl/pull/680
#!/bin/bash
for scene_dir in `ls`; do # scene dir
if [[ -d $scene_dir ]]; then
cd $scene_dir
for scene_subdir in `ls`; do # scene subdir
if [[ -d $scene_subdir ]]; then
cd $scene_subdir
index=1
item=${scene_subdir}_${index}
color_image=${item}.png
@xiangxw
xiangxw / xcb_selection_change.c
Last active January 1, 2016 10:29
I'm looking for help with selection change event in xcb-xfixes. I want capture selection change event and I write a simple program with xcb-xfixes. With Uli Schlachter's help, I can receive SELECTION_NOTIFY event now, but I can't get any events when the selection is cleared. Is there a way to achieve this? Please help me, thanks.
#include <stdio.h>
#include <xcb/xcb.h>
#include <xcb/xfixes.h>
int main(void)
{
xcb_connection_t *c;
xcb_screen_t *screen;
xcb_window_t win;
xcb_generic_event_t *e;