Fixes
- Fix i definition in last_consecutive - Update flags in rotate
This commit is contained in:
parent
17e0cc3fd8
commit
76550fc1ec
1 changed files with 2 additions and 1 deletions
3
utils.py
3
utils.py
|
@ -191,6 +191,7 @@ def last_consecutive( list_ ):
|
|||
if not isinstance( list_ , list ) and not isinstance( list_ , np.ndarray ):
|
||||
raise ValueError( 'list_ must be a list, ' + type( list_ ) + ' given' )
|
||||
first , lower , greater = list_[0] , 0 , len( list_ )
|
||||
i = lower + ( greater - lower ) // 2
|
||||
while greater - lower != 1:
|
||||
i = lower + ( greater - lower ) // 2
|
||||
if list_[ i ] - first != i: # outside of the consecutive list
|
||||
|
@ -210,4 +211,4 @@ def rotate( image , angle ):
|
|||
height , width = image.shape[ : 2 ]
|
||||
cX , cY = ( width // 2 , height // 2 )
|
||||
matrix = cv2.getRotationMatrix2D( ( cX , cY ) , angle , 1 )
|
||||
return cv2.warpAffine( image , matrix , ( width , height ) , flags = cv2.INTER_LINEAR )
|
||||
return cv2.warpAffine( image , matrix , ( width , height ) , flags = cv2.INTER_NEAREST )
|
||||
|
|
Loading…
Reference in a new issue