You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: img_process_fuc.m
    path of file: ./repos/GLCM-SVM/src
    
    the code of the file until where you have to start completion: function [ energy,contrast,correlation,entropy,deficit] = img_process_fuc( img_file )

img = imread(img_file,'jpg'); %imshow(image); %读取图片
img = rgb2gray(img);%转为灰度图像
img = histeq(img);%直方图均衡化


    
function [ energy,contrast,correlation,entropy,deficit] = img_process_fuc( img_file )

img = imread(img_file,'jpg'); %imshow(image); %读取图片
img = rgb2gray(img);%转为灰度图像
img = histeq(img);%直方图均衡化

gray_leave = 256 ;%灰度级数
gray_leave_com = 32 ;%压缩后灰度级数
dx = 1 ; dy = 1 ;%搜寻灰度步进长度
[L,W] = size(img);%图片的尺寸，L长 ，W宽

%--------------------------------------------------------------------------
%2.为了减少计算量，对原始图像灰度级压缩，将img量化成16级
%--------------------------------------------------------------------------
for i = 1 : L
    for j = 1 : W
        for n = 1 : gray_leave_com
            if (n-1)*(gray_leave/gray_leave_com) <= img(i ,j)  && ...
                    img(i ,j)<= (n-1)*(gray_leave/gray_leave_com )+(gray_leave/gray_leave_com )-1
                img(i ,j) = n-1;
            end