This post is a small part form our paper in Journal of Applied Physics (T. Nguyen, N. Kakuta, K. Uchida, H. Nagano, Near-infrared imaging of heat transfer behavior between gadolinium and fluid during magnetization/demagnetization process of magnetocaloric effect, J. Appl. Phys. 135 (2024)).

Figure 1. Amount of energy exchanged between the sample and fluid
The amount of energy exchanged between the sample and fluid (Figure 1):
$$
Q = \iiint_0^d \rho c \Delta T \, \text{d}x \, \text{d}y \, \text{d}z = \iint \rho c \frac{\Delta A}{\alpha} \, \text{d}x \, \text{d}z=\sum_{i,j}^N \frac{\rho c \sigma}{\alpha}\Delta A^{ij}
$$
The main idea is that we find $Q$ in one pixel, and the integrate to the whole area of 2D image.
To do that we need to follow three steps:
- Finding the spatial resolution of the image (This can be done by determine in advance depending on the lens we use). For example, we determine the spatial resolution about 40 μm, then calculating the area of one pixel, $\sigma$.
- Identify the total number of pixels, $N$. The number of pixels in the image can be directly obtained from the image resolution. For example, an image with a resolution of 1024 × 768 pixels will have N = 1024 × 768.
- Check $\alpha$ (e.g., temperature coefficient, which has a value of $2.76 × 10^{−4} \text K^{−1} \text {mm}^{−1}$ at $1150 \text{nm}$)
- Integrate energy across all pixels
Calculate the energy contribution for each pixel using the energy exchanged formula. Finally, sum these contributions across all $N$ pixels to obtain the total exchanged energy $Q$.
