• opengl3d
    了解作者
  • C++
    开发工具
  • 1.7MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 10
    下载次数
  • 2005-08-16 12:21
    上传日期
VIGRA is a computer vision library that puts its main emphasize on flexible algorithms, because algorithms represent the principle know-how of this field. The library was consequently built using generic programming as introduced by Stepanov and Musser and exemplified in the C++ Standard Template Library. By writing a few adapters (image iterators and accessors) you can use VIGRA s algorithms on top of your data structures, within your environment. Alternatively, you can also use the data structures provided within VIGRA, which can be easily adapted to a wide range of applications. VIGRA s flexibility comes almost for free: Since the design uses compile-time polymorphism (templates), performance of the compiled program approaches that of a traditional, hand tuned, inflexible, solution.
vigra.rar
  • vigra
  • vigra.PFI
    344B
  • cornerdetection.hxx
    23.9KB
  • config.hxx
    5.6KB
  • iteratoradapter.hxx
    9.2KB
  • void_vector.o
    59.8KB
  • pixelneighborhood.hxx
    35KB
  • byteorder.cxx
    1.1KB
  • 1.bmp
    336KB
  • linear_solve.hxx
    11.2KB
  • labelimage.hxx
    33.6KB
  • rational.hxx
    35.6KB
  • imageiteratoradapter.hxx
    15.6KB
  • stdimage.hxx
    7.9KB
  • functorexpression.hxx
    59.9KB
  • vigra.PO
    776B
  • multi_array.hxx
    43.7KB
  • linear_algebra.hxx
    1.7KB
  • resampling_convolution.hxx
    21.2KB
  • utilities.hxx
    2.7KB
  • main.o
    1.5MB
  • orientedtensorfilters.hxx
    20.2KB
  • error.hxx
    9.1KB
  • void_vector.hxx
    7.2KB
  • interpolating_accessor.hxx
    5.2KB
  • boundarytensor.hxx
    28.1KB
  • mathutil.hxx
    5.3KB
  • matrix.hxx
    46.3KB
  • iteratortraits.hxx
    20.3KB
  • inspectimage.hxx
    42.6KB
  • numerictraits.hxx
    55.7KB
  • bordertreatment.hxx
    2.8KB
  • copyimage.hxx
    9.2KB
  • accessor.hxx
    37.3KB
  • stdconvolution.hxx
    55.7KB
  • bmp.hxx
    3.2KB
  • polynomial.hxx
    32.8KB
  • edgedetection.hxx
    51.5KB
  • multi_iterator.hxx
    55.4KB
  • navigator.hxx
    7.2KB
  • basicimageview.hxx
    15.4KB
  • gaborfilter.hxx
    13.4KB
  • tinyvector.hxx
    36.1KB
  • imageinfo.o
    1.2MB
  • vigra.IMD
    1.8KB
  • fftw.hxx
    39.3KB
  • symmetry.hxx
    8.3KB
  • rgbvalue.hxx
    30.6KB
  • resizeimage.hxx
    48.4KB
  • vigra.IAD
    6.9KB
  • basicgeometry.hxx
    23.2KB
  • 2.bmp
    113.4KB
  • array_vector.hxx
    12.9KB
  • codec.hxx
    5.9KB
  • vigra.WK3
    10.4KB
  • vigra.PS
    1.1MB
  • error2.hxx
    238B
  • multi_convolution.hxx
    26.9KB
  • vigra.PR
    26.7KB
  • recursiveconvolution.hxx
    49.2KB
  • vigra.layout
    6.4KB
  • byteorder.o
    127.5KB
  • transformimage.hxx
    39.7KB
  • main.cpp
    5.1KB
  • multi_pointoperators.hxx
    60.9KB
  • combineimages.hxx
    23.5KB
  • memory.hxx
    2.6KB
  • stdimagefunctions.hxx
    3.5KB
  • codecmanager.o
    623KB
  • vigra.dev
    11.5KB
  • vigra.IAB
    676KB
  • imagecontainer.hxx
    13.6KB
  • fftw3.hxx
    63.8KB
  • vigra.IMB
    152KB
  • colorconversions.hxx
    88.6KB
  • imageinfo.cxx
    11.9KB
  • vigra.PRI
    170.5KB
  • functortraits.hxx
    8KB
  • initimage.hxx
    14.8KB
  • void_vector.cxx
    1.8KB
  • impex.hxx
    31.3KB
  • bmp.o
    500.3KB
  • localminmax.hxx
    23.4KB
  • separableconvolution.hxx
    53.5KB
  • byteorder.hxx
    5.3KB
  • codecmanager.cxx
    11.9KB
  • convolution.hxx
    42.8KB
  • eigensystem.hxx
    29.8KB
  • codecmanager.hxx
    3.6KB
  • diff2d.hxx
    35.5KB
  • imageinfo.hxx
    12.6KB
  • splines.hxx
    27.6KB
  • Makefile.win
    1.2KB
  • flatmorphology.hxx
    38.1KB
  • vigra.exe
    3.2MB
  • basicimage.hxx
    36.6KB
  • rfftw.hxx
    7.7KB
  • tensorutilities.hxx
    17.1KB
  • tuple.hxx
    5.6KB
  • distancetransform.hxx
    12.8KB
内容介绍
#include <iostream> #include <stdlib.h> #include <vector> #include "config.hxx" #include "error.hxx" #include "metaprogramming.hxx" #include "memory.hxx" #include "iteratoradapter.hxx" #include "iteratortags.hxx" #include "iteratortraits.hxx" #include "tuple.hxx" #include "transformimage.hxx" #include "array_vector.hxx" #include "basicgeometry.hxx" #include "basicimageview.hxx" #include "bordertreatment.hxx" #include "boundarytensor.hxx" #include "codec.hxx" #include "colorconversions.hxx" #include "contourcirculator.hxx" #include "distancetransform.hxx" #include "edgedetection.hxx" #include "eigensystem.hxx" #include "flatmorphology.hxx" #include "functorexpression.hxx" #include "gaborfilter.hxx" #include "imageinfo.hxx" #include "impex.hxx" #include "interpolating_accessor.hxx" #include "linear_algebra.hxx" #include "localminmax.hxx" #include "multi_convolution.hxx" #include "orientedtensorfilters.hxx" #include "seededregiongrowing.hxx" #include "splineimageview.hxx" #include "symmetry.hxx" #include "tensorutilities.hxx" using namespace std; using namespace vigra; int main(int argc, char *argv[]) { if(argc != 2) { std::cout << "Usage: " << argv[0] << " infile" << std::endl; std::cout << "(supported formats: " << impexListFormats() << ")" << std::endl; std::cout << "creates: boundarystrength.tif, cornerstrength.tif" << std::endl; return 1; } try { ImageImportInfo info(argv[1]); int w = info.width(), h = info.height(); // create image of appropriate size for boundary tensor FVector3Image boundarytensor(w, h); // input scale of the bandpass to be used double scale; std::cout << "Operator scale ? "; std::cin >> scale; if(info.isGrayscale()) { FImage in(w, h); importImage(info, destImage(in)); boundaryTensor(srcImageRange(in), destImage(boundarytensor), scale); } else if(info.isColor()) { FRGBImage in(w, h); importImage(info, destImage(in)); // calculate the boundary tensor for every channel and add the results FVector3Image bandtensor(w, h); for(int b=0; b<3; ++b) { VectorElementAccessor<FRGBImage::Accessor> band(b); boundaryTensor(srcImageRange(in, band), destImage(bandtensor), scale); combineTwoImages(srcImageRange(boundarytensor), srcImage(bandtensor), destImage(boundarytensor), std::plus<FVector3Image::value_type>()); } } else { std::cerr << "Sorry, can only operate on gray and color images.\n"; return 1; } FImage boundarystrength(w, h), cornerness(w, h); FVector2Image edgeness(w,h); tensorTrace(srcImageRange(boundarytensor), destImage(boundarystrength)); tensorToEdgeCorner(srcImageRange(boundarytensor), destImage(edgeness), destImage(cornerness)); exportImage(srcImageRange(boundarystrength), ImageExportInfo("2.bmp").setPixelType("UINT8")); exportImage(srcImageRange(cornerness), ImageExportInfo("2.bmp").setPixelType("UINT8")); } catch (std::exception & e) { std::cout << e.what() << std::endl; return 1; } /* if(argc != 3) { std::cout << "Usage: " << argv[0] << " infile outfile" << std::endl; std::cout << "(supported formats: " << vigra::impexListFormats() << ")" << std::endl; return 1; } try { // read image given as first argument // file type is determined automatically vigra::ImageImportInfo info(argv[1]); if(info.isGrayscale()) { // create a gray scale image of appropriate size vigra::BImage in(info.width(), info.height()); // import the image just read importImage(info, destImage(in)); // write the image to the file given as second argument // the file type will be determined from the file name's extension exportImage(srcImageRange(in), vigra::ImageExportInfo(argv[2])); } else { // create a RGB image of appropriate size vigra::BRGBImage in(info.width(), info.height()); // import the image just read importImage(info, destImage(in)); // write the image to the file given as second argument // the file type will be determined from the file name's extension exportImage(srcImageRange(in), vigra::ImageExportInfo(argv[2])); } } catch (vigra::StdException & e) { // catch any errors that might have occured and print their reason std::cout << e.what() << std::endl; return 1; } */ return 0; }
评论
    相关推荐