Derivative of 2D dose (intensity) image wrt distance

4 vues (au cours des 30 derniers jours)
De Ar
De Ar le 7 Déc 2022
Réponse apportée : Aastha le 11 Juin 2025
I have a 2D image of size M×N representing a radiation dose map with a local dose , where is the spatial coordinate. I want to estimate both derivatives and with respect to r - how do I do that? If neccessary, the spatial resolution is 21 /pixel and isotropic.
Thanks in advance for any help or guidance!

Réponses (1)

Aastha
Aastha le 11 Juin 2025
Hi @De Ar,
I understand that you have a 2D image representing a radiation dose map and you want to compute the first and second-order spatial derivatives. You have also mentioned that the spatial resolution is 21 μm/pixel.
To compute the derivatives, you may refer to the steps outlined below:
1. Use the “gradient” function to compute the first-order spatial derivatives using a finite difference approximation. Kindly refer to the MATLAB code snippet below to do so:
delta = 21e-6; % Spatial resolution in meters (21 micrometers)
[dose_dy, dose_dx] = gradient(dose, delta); % Compute gradient components
At each pixel, this returns two values corresponding to the partial derivatives ∂dose/∂y and ∂dose/∂x.
You may refer to MathWorks documentation of “gradient” function for any queries on it:
2. To compute the second-order spatial derivatives, apply the gradient function again to the first-order derivatives. This yields the entries of the Hessian matrix at each pixel:
[d2Iyy, d2Iyx] = gradient(dose_dy, delta); % ∂²dose/∂y² and ∂²dose/∂y∂x
[d2Ixy, d2Ixx] = gradient(dose_dx, delta); % ∂²dose/∂x∂y and ∂²dose/∂x²
These second-order derivatives describe how the gradient itself changes spatially and can be assembled into the Hessian matrix to analyze curvature and local structure.
I hope this helps!

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by