I was using opencv 2.3 o my project two years ago with the cvSet2D, but i use the command with opencv 3.4 i receive the message undeclared identifier

thanks, i was working in treatment of image in advanced desert
that’s the part of code


Mat mat2image(int **matrice)
{
	Mat image;
	Scalar pixel_val;
	int x, y;
	image.create(Size(Activerows, Activecols),3);// IPL_DEPTH_8U
																		   //for (x = 0; x<image->width; x++)
																		   //for (y = 0; y<image->height; y++)
	for (x = 0; x<Activerows; x++)
		for (y = 0; y<Activecols; y++)
		{
		//	pixel_val = image.at.cvGet2D(image,x, y);//toutes les composantes YCrCb
			pixel_val = image.at<int>(x,y);//toutes les composantes YCrCb
			pixel_val.val[0] = matrice[x][y];//Y
			image.at.cvSet2D(image,x, y, pixel_val);
		}

	return (image);
}