Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Removed option to create top level of every octave from input image [PR](https://github.com/alicevision/popsift/pull/178)
- Removed option to compute very narrow Gaussian filters called opencv [PR](https://github.com/alicevision/popsift/pull/179)
- Removed unreachable code for alternative downscaling between octaves [PR](https://github.com/alicevision/popsift/pull/180)

## [0.10.0] - 2025-10-14

Expand Down
58 changes: 11 additions & 47 deletions src/popsift/s_pyramid_build.cu
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ namespace popsift {

namespace gauss {

__global__
void get_by_2_interpolate( cudaTextureObject_t src_data,
const int src_level,
cudaSurfaceObject_t dst_data,
const int dst_w,
const int dst_h )
{
const int idx = blockIdx.x * blockDim.x + threadIdx.x;
const int idy = blockIdx.y * blockDim.y + threadIdx.y;

if( idx >= dst_w ) return;
if( idy >= dst_h ) return;

const float val = readTex( src_data, 2.0f * idx + 1.0f, 2.0f * idy + 1.0f, src_level );

surf2DLayeredwrite( val, dst_data, idx*4, idy, 0, cudaBoundaryModeZero ); // dst_data.ptr(idy)[idx] = val;
}

__global__
void get_by_2_pick_every_second( cudaTextureObject_t src_data,
const int src_w,
Expand Down Expand Up @@ -214,35 +196,17 @@ inline void Pyramid::downscale_from_prev_octave( int octave, cudaStream_t stream
h_grid.x = (unsigned int)grid_divide( width, h_block.x );
h_grid.y = (unsigned int)grid_divide( height, h_block.y );

switch( mode )
{
case Config::PopSift :
case Config::VLFeat :
case Config::OpenCV :
gauss::get_by_2_pick_every_second
<<<h_grid,h_block,0,stream>>>
( prev_oct_obj.getDataTexPoint( ),
prev_oct_obj.getWidth(),
prev_oct_obj.getHeight(),
_levels-PREV_LEVEL,
oct_obj.getDataSurface( ),
oct_obj.getWidth(),
oct_obj.getHeight() );

POP_SYNC_CHK;
break;
default :
gauss::get_by_2_interpolate
<<<h_grid,h_block,0,stream>>>
( prev_oct_obj.getDataTexLinear( ).tex,
_levels-PREV_LEVEL,
oct_obj.getDataSurface( ),
oct_obj.getWidth(),
oct_obj.getHeight() );

POP_SYNC_CHK;
break;
}
gauss::get_by_2_pick_every_second
<<<h_grid,h_block,0,stream>>>
( prev_oct_obj.getDataTexPoint( ),
prev_oct_obj.getWidth(),
prev_oct_obj.getHeight(),
_levels-PREV_LEVEL,
oct_obj.getDataSurface( ),
oct_obj.getWidth(),
oct_obj.getHeight() );

POP_SYNC_CHK;
}

__host__
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/sift_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ struct Config
/// default: 1
int _filter_grid_size;

/// Modes are computation according to VLFeat or OpenCV,
/// Modes are computation according to VLFeat
/// or fixed size. Default is VLFeat mode.
GaussMode _gauss_mode;

Expand Down