The compression of medical images is extremely important in medical applications. The compression algorithms allow an efficient way to represent image data, reducing the space required for storage and allow to minimize the demand in transmission through the communication channels. In the JPEG algorithm, the quantization matrix determines the quality of the reconstructed image and thus improved matrices were constructed. This paper makes a comparative study of the performance of the algorithm using JPEG quantization matrices optimized for compression of video frames of ultrasound image. A comparison was made between the traditional quantization matrix of the JPEG algorithm and a set of quantization matrices optimized for this algorithm. This comparison is made using compression measured in bits per [bpp] and criteria of objective fidelity (PSNR, MSE, SSIM and CC). There is coherence between the values of PSNR, MSE, SSIM and CC and the results show that the improved quantization matrices outperform the traditional matrix in terms of performance and can improve the image quality to values of PSNR slightly above 2dB.