Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added formula for VOSM 0.3.2 #11272

Closed
wants to merge 1 commit into from

2 participants

Brenton Partridge Adam Vandenberg
Brenton Partridge

An LGPL library for statistical modeling and face alignment. Tested with real image data on Lion 10.7.2. This is the latest stable release of the library.

Brenton Partridge

I've made a forum post, but the (unstable) trunk seems to be unable to compile whatsoever, so these comments should be as useful as a patch to the development team, possibly more so.

Also, I neglected to specify CMAKE_INSTALL_PREFIX=#{prefix} in this pull request (oops), and I'll add commits shortly that fix that once I've tested thoroughly.

Brenton Partridge

For reference, this is the output that results using this homebrew installation on the demo corpora; note that AFAIK this is currently the only cross-platform open-source library that can accomplish this task.

Adam Vandenberg
Owner

Please squash to a single commit, and rebase on master. Keep this in a separate branch so we don't get merge commits in here.

Brenton Partridge

Squashed.

Adam Vandenberg

Has this been reported upstream?

Adam Vandenberg
Owner

@jacknagel @Sharpie @mistydemeo is there someone with OpenCV installed who can test this?

Adam Vandenberg
Owner

Getting build errors:

/usr/bin/tar xf /usr/local/homebrew-cache/vosm-0.3.2.tar.bz2
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_regex)' with 'boost_regex-mt' failed
Warning: inreplace: replacement of '(?-mix:boost_filesystem)' with 'boost_filesystem-mt boost_system-mt' failed

...

[ 92%] Building CXX object modules/smbuilding/CMakeFiles/smbuilding.dir/src/VO_Texture.o
/tmp/homebrew-vosm-0.3.2-oQeT/vosm-0.3.2/modules/smbuilding/src/VO_ShapeModel.cpp:358:39: error: use of undeclared identifier
      'cvSubdiv2DEdgeOrg'; did you mean 'CvSubdiv2DEdge'?
            CvSubdiv2DPoint* org_pt = cvSubdiv2DEdgeOrg((CvSubdiv2DEdge)edge);
                                      ^
/tmp/homebrew-vosm-0.3.2-oQeT/vosm-0.3.2/modules/smbuilding/src/VO_ShapeModel.cpp:359:39: error: use of undeclared identifier
      'cvSubdiv2DEdgeDst'; did you mean 'CvSubdiv2DEdge'?
            CvSubdiv2DPoint* dst_pt = cvSubdiv2DEdgeDst((CvSubdiv2DEdge)edge);
                                      ^
/tmp/homebrew-vosm-0.3.2-oQeT/vosm-0.3.2/modules/smbuilding/src/VO_ShapeModel.cpp:472:20: error: use of undeclared identifier
      'cvCreateSubdivDelaunay2D'
    tempCVSubdiv = cvCreateSubdivDelaunay2D( rect, DelaunayStorage );
                   ^
/tmp/homebrew-vosm-0.3.2-oQeT/vosm-0.3.2/modules/smbuilding/src/VO_ShapeModel.cpp:477:9: error: use of undeclared identifier
      'cvSubdivDelaunay2DInsert'
        cvSubdivDelaunay2DInsert( tempCVSubdiv, onePoint);
        ^
[ 94%] Building CXX object modules/smbuilding/CMakeFiles/smbuilding.dir/src/VO_TextureModel.o
/tmp/homebrew-vosm-0.3.2-oQeT/vosm-0.3.2/modules/smbuilding/src/VO_ShapeModel.cpp:485:25: error: use of undeclared identifier
      'cvClearSubdivVoronoi2D'
    if (tempCVSubdiv)   cvClearSubdivVoronoi2D( tempCVSubdiv );
Adam Vandenberg
Owner

There's a new version out: http://sourceforge.net/projects/vosm/files/vosm-0.3.3/

I'll try getting that to compile, but if I can't, I'll probably close this request and wait for someone to reopen with an updated formula.

Adam Vandenberg adamv was assigned
Adam Vandenberg
Owner

0.3.3 gets almost to the end and fails somewhat silently:

[ 97%] Building CXX object modules/smbuilding/CMakeFiles/smbuilding.dir/src/VO_WarpingPoint.o
cd /tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding && /usr/local/homebrew/Library/ENV/4.3/c++   -DHAVE_CONFIG_H -DCVAPI_EXPORTS -I/usr/local/include/opencv -I/tmp/vosm-YdyD/vosm-0.3.3/. -I/tmp/vosm-YdyD/vosm-0.3.3 -I/tmp/vosm-YdyD/vosm-0.3.3/include -I/tmp/vosm-YdyD/vosm-0.3.3/include/opencv -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/../common/include -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/../cvcommon/include -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/../ensembletraining/include -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/../integraltransform/include -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/../featureextraction/include -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/include -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/src -I/tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding    -o CMakeFiles/smbuilding.dir/src/VO_WarpingPoint.o -c /tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding/src/VO_WarpingPoint.cpp
brew: superenv removed: -I/tmp/vosm-YdyD/vosm-0.3.3
Linking CXX static library ../../lib/libsmbuilding.a
cd /tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding && /usr/local/homebrew/Cellar/cmake/2.8.9/bin/cmake -P CMakeFiles/smbuilding.dir/cmake_clean_target.cmake
cd /tmp/vosm-YdyD/vosm-0.3.3/modules/smbuilding && /usr/local/homebrew/Cellar/cmake/2.8.9/bin/cmake -E cmake_link_script CMakeFiles/smbuilding.dir/link.txt --verbose=1
/usr/bin/ar cr ../../lib/libsmbuilding.a  CMakeFiles/smbuilding.dir/src/VO_AAMBasic.o CMakeFiles/smbuilding.dir/src/VO_AAMForwardIA.o CMakeFiles/smbuilding.dir/src/VO_AAMInverseIA.o CMakeFiles/smbuilding.dir/src/VO_AFM.o CMakeFiles/smbuilding.dir/src/VO_ASMLTCs.o CMakeFiles/smbuilding.dir/src/VO_ASMNDProfiles.o CMakeFiles/smbuilding.dir/src/VO_AXM.o CMakeFiles/smbuilding.dir/src/VO_Edge.o CMakeFiles/smbuilding.dir/src/VO_Ellipse.o CMakeFiles/smbuilding.dir/src/VO_FacePart.o CMakeFiles/smbuilding.dir/src/VO_FaceParts.o CMakeFiles/smbuilding.dir/src/VO_FeatureModel.o CMakeFiles/smbuilding.dir/src/VO_Point2DDistributionModel.o CMakeFiles/smbuilding.dir/src/VO_Profile.o CMakeFiles/smbuilding.dir/src/VO_Shape.o CMakeFiles/smbuilding.dir/src/VO_Shape2DInfo.o CMakeFiles/smbuilding.dir/src/VO_ShapeFace.o CMakeFiles/smbuilding.dir/src/VO_ShapeModel.o CMakeFiles/smbuilding.dir/src/VO_Texture.o CMakeFiles/smbuilding.dir/src/VO_TextureModel.o CMakeFiles/smbuilding.dir/src/VO_Triangle2DStructure.o CMakeFiles/smbuilding.dir/src/VO_WarpingPoint.o
/usr/bin/ranlib ../../lib/libsmbuilding.a
/usr/local/homebrew/Cellar/cmake/2.8.9/bin/cmake -E cmake_progress_report /tmp/vosm-YdyD/vosm-0.3.3/CMakeFiles  34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
[ 97%] Built target smbuilding
make: *** [all] Error 2
Adam Vandenberg
Owner

Would definitely accept a working 0.3.3 version for review, but closing due to the age of the ticket.

Adam Vandenberg adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 49 additions and 0 deletions.
  1. +49 −0 Library/Formula/vosm.rb
49 Library/Formula/vosm.rb
View
@@ -0,0 +1,49 @@
+require 'formula'
+
+# LGPL library for 2D statistical models
+#
+# Features:
+# 2D statistical model building, including 2D shape model, 2D texture model and 2D concatenated appearance model
+# ND profile ASMs, including traditional 1D profile ASM, newly proposed 2D profile ASM
+# Local texture contrained (LTC) ASMs, here, only direct LTC-ASM is implemented
+# Numerical solution to AAM, including basic AAM, etc.
+# Analytical solutions to AAM, including inverse compositional image alignment(ICIA) AAM, and inverse additive image alignment (IAIA) AAM
+
+class Vosm < Formula
+ homepage 'http://www.visionopen.com/resources/computer-vision/statistical-models/'
+ url 'http://downloads.sourceforge.net/project/vosm/vosm-0.3.2/vosm-0.3.2.tar.bz2'
+ md5 '56dce9f67e462c60e60e3d9486ea1e4c'
+
+ depends_on 'cmake' => :build
+ depends_on 'opencv'
+ depends_on 'boost'
+
+ def install
+
+ # More modern versions of boost-filesystem cannot take
+ # boost::filesystem::native as a second argument
+
+ inreplace 'modules/utils/src/VO_ScanFilesInDir.cpp' do |s|
+ s.gsub! /,\s*native/, ''
+ end
+
+ # The current CMakeLists.txt across the program do not
+ # use the multithreaded libraries, nor do they include boost-system
+
+ inreplace Dir['**/CMakeLists.txt'] do |s|
+ s.gsub! /boost_regex/, 'boost_regex-mt'
+ s.gsub! /boost_filesystem/, 'boost_filesystem-mt boost_system-mt'
+ end
+
+ # Cannot build dynamic libraries at the moment!
+ # This is acknowledged by the original developer: see
+ # http://www.visionopen.com/forum/computer-vision-group3/vosm-vosm-explorer-forum5/build-vosm-in-vs2010-thread6.0/#postid-34
+
+ system "cmake -D BUILD_SHARED_LIBS=OFF -D CMAKE_INSTALL_PREFIX:PATH=#{prefix} ."
+ system "make install"
+ end
+
+ def test
+ system "vo_smfitting"
+ end
+end
Something went wrong with that request. Please try again.