From: Matt L. <mat...@ki...> - 2011-09-06 18:01:24
|
Andrew, I wrote this code long ago. It was 8 years ago, and I implemented Lowe's SIFT detector as a course project in my first semester as a grad student. It looks like that code has since been pushed to VXL and people are using it. I'm not surprised that there are a few corner cases that need to be ironed out. Anyway, I suspect your issue arises because your test image has an artificially constant white background. That will produce lots of exactly zero gradients. The code that is asserting is trying to calculate the peak gradient orientation using a weighted histogram of orientations. The assert indicates that no peak was found. This could happen if the histogram is uniform or if maximum value is exactly the same in two adjacent bins. Normally this does not happen in real images, but might be happening here due to the white background. I suggest that you inspect the histogram values when the assert fires and see what they are. That will help guide how to address this corner case. --Matt Leotta On Mon, Aug 29, 2011 at 11:22 AM, Andrew Hoelscher <ao...@co...> wrote: > Hey all, > > I'm trying to use the bapl implementation of the sift feature detection, and > I'm running into some problems. There is an assertion failure at > bapl_keypoint_extractor.cxx, line 369, with the following error message: > > ...vxl/contrib/brl/bseg/bapl/bapl_keypoint_extractor.cxx:369: void > bapl_lowe_orientation::orient_at(float, float, float, const > vil_image_view<float>&, const vil_image_view<float>&, std::vector<float, > std::allocator<float> >&): Assertion `!peaks.empty()' failed. > > I'm using it in the following way: > > vil_image_resource_sptr img = vil_load_image_resource(argv[1], false); > > vcl_vector<bapl_keypoint_sptr> keypoints; > bapl_keypoint_extractor(img, keypoints, settings.keypoint_curve_ratio, > false); > > The image I'm using is attached. It is 64x64 grayscale. Anyone have any > insight? I'm running Ubuntu 10.10, with gcc version 4.4.5, if that helps. > Thanks! > Drew > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > Vxl-users mailing list > Vxl...@li... > https://lists.sourceforge.net/lists/listinfo/vxl-users > > |