From: <tum...@li...> - 2012-01-31 11:07:55
|
Revision: 986 http://tum-ros-pkg.svn.sourceforge.net/tum-ros-pkg/?rev=986&view=rev Author: moesenle Date: 2012-01-31 11:07:48 +0000 (Tue, 31 Jan 2012) Log Message: ----------- Author: Dejan Pangercic <dej...@gm...> Date: Tue Jan 31 12:07:05 2012 +0100 commit 05ca8af0ca8c6b8e96876789e20ddceac4db4ecc Author: Dejan Pangercic <dej...@gm...> Date: Tue Jan 31 12:06:34 2012 +0100 added system deps commit ac04cfa29420148be13c98195eb1ea423b406457 Author: Dejan Pangercic <dej...@cs...> Date: Mon Jan 30 21:53:49 2012 +0100 not needed filed anymore commit e0ae46178d3e1ce6787ba2bb0d5924f142d4fc34 Author: Dejan Pangercic <dej...@cs...> Date: Mon Jan 30 21:49:26 2012 +0100 public export commit 694aac589283166617448c925b62fea7e506f343 Author: Dejan Pangercic <dej...@cs...> Date: Mon Jan 30 21:48:26 2012 +0100 object recognition using barcoo working, major refactoring of the barcode_reader_node.zpp needed git-commit Modified Paths: -------------- perception/zbar_barcode_reader_node/CMakeLists.txt perception/zbar_barcode_reader_node/manifest.xml Added Paths: ----------- perception/zbar_barcode_reader_node/rosdep.yaml Removed Paths: ------------- perception/zbar_barcode_reader_node/src/scan_image.cpp Modified: perception/zbar_barcode_reader_node/CMakeLists.txt =================================================================== --- perception/zbar_barcode_reader_node/CMakeLists.txt 2012-01-30 20:53:08 UTC (rev 985) +++ perception/zbar_barcode_reader_node/CMakeLists.txt 2012-01-31 11:07:48 UTC (rev 986) @@ -31,9 +31,6 @@ rosbuild_add_executable(zbar_barcode_reader src/zbar_barcode_reader.c) target_link_libraries(zbar_barcode_reader MagickWand MagickCore) -rosbuild_add_executable(zbar_barcode_reader_cpp src/scan_image.cpp) -target_link_libraries(zbar_barcode_reader_cpp MagickWand MagickCore Magick++ curl) - rosbuild_add_executable(zbar_barcode_reader_node src/zbar_barcode_reader_node.cpp) target_link_libraries(zbar_barcode_reader_node Magick++ curl) Modified: perception/zbar_barcode_reader_node/manifest.xml =================================================================== --- perception/zbar_barcode_reader_node/manifest.xml 2012-01-30 20:53:08 UTC (rev 985) +++ perception/zbar_barcode_reader_node/manifest.xml 2012-01-31 11:07:48 UTC (rev 986) @@ -13,7 +13,8 @@ <depend package="cv_bridge"/> <depend package="image_transport"/> <depend package="sensor_msgs"/> - + <rosdep name="libcurl"/> + <rosdep name="libtinyxml"/> </package> Added: perception/zbar_barcode_reader_node/rosdep.yaml =================================================================== --- perception/zbar_barcode_reader_node/rosdep.yaml (rev 0) +++ perception/zbar_barcode_reader_node/rosdep.yaml 2012-01-31 11:07:48 UTC (rev 986) @@ -0,0 +1,7 @@ +libcurl: + ubuntu: + 11.04: libcurl3 + +libtinyxml: + ubuntu: + 11.04: libtinyxml-dev Deleted: perception/zbar_barcode_reader_node/src/scan_image.cpp =================================================================== --- perception/zbar_barcode_reader_node/src/scan_image.cpp 2012-01-30 20:53:08 UTC (rev 985) +++ perception/zbar_barcode_reader_node/src/scan_image.cpp 2012-01-31 11:07:48 UTC (rev 986) @@ -1,54 +0,0 @@ -#include <iostream> -#include <Magick++.h> -#include <zbar.h> -#define STR(s) #s - -using namespace std; -using namespace zbar; - -int main (int argc, char **argv) -{ - if(argc < 2) return(1); - -#ifdef MAGICK_HOME - // http://www.imagemagick.org/Magick++/ - // under Windows it is necessary to initialize the ImageMagick - // library prior to using the Magick++ library - Magick::InitializeMagick(MAGICK_HOME); -#endif - - // create a reader - ImageScanner scanner; - - // configure the reader - scanner.set_config(ZBAR_NONE, ZBAR_CFG_ENABLE, 1); - - // obtain image data - Magick::Image magick(argv[1]); // read an image file - int width = magick.columns(); // extract dimensions - int height = magick.rows(); - Magick::Blob blob; // extract the raw data - magick.modifyImage(); - magick.write(&blob, "GRAY", 8); - const void *raw = blob.data(); - - // wrap image data - Image image(width, height, "Y800", raw, width * height); - - // scan the image for barcodes - int n = scanner.scan(image); - - // extract results - for(Image::SymbolIterator symbol = image.symbol_begin(); - symbol != image.symbol_end(); - ++symbol) { - // do something useful with results - cout << "decoded " << symbol->get_type_name() - << " symbol \"" << symbol->get_data() << '"' << endl; - } - - // clean up - image.set_data(NULL, 0); - - return(0); -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |