# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
from skimage.feature import hessian_matrix, hessian_matrix_eigvals
square = np.zeros((5, 5))
square[2, 2] = 4
# square[3, 3] = 2
Hxx, Hxy, Hyy = hessian_matrix(square, sigma=0.001)
i1 = hessian_matrix_eigvals(Hxx, Hxy, Hyy)[0]

Hxx

Hyy

Hxy

np.gradient(np.gradient(square, axis=0), axis=0)

square



StarcoderdataJupyterScriptsDedupFiltered