Performing slicing operations on laplacian gradient array gives empty array sometimes

Viewed 16

link to image laplacian(https://github.com/raj-upadhyay9/test/blob/main/test.jpg?raw=true)

rect.top() = 108
rect.left() = 194
rect.right() = 452
rect.bottom() = 366

shape[25][1] = 134
shape[26][0] = 425

forehead = laplacian[rect.top(): shape[25][1],rect.left():shape[26][0]]

gives an empty list I want to get the upper part of the image(the forehead part of the face) the shape array is from dlib and it sometime gives empty array when I try to slice laplacian image

0 Answers
Related