# How to convert a CV_32SC1 to int

I'm now using opencv for super-resolution. In one step I have to get the affine matrix and apply the transform to another matrix (which is not a Mat). I have some problems when trying to get the data from affine matrix (a 2*3 Mat). My code:

```
Mat affine = Mat(2,3,CV_32SC1);
affine = getAffineTransform(corners_cur, corners_ref);
cout<<affine<<endl;
for(int y=0;y<2;y++)
{
for(int x=0;x<3;x++)
cout<<affine.at<int>(y,x)<<' ';
cout<<endl;
}
```

I output the 'affine' matrix twice, using different methods. The results is as below:

[1.004656149032001, -0.02000349563412032, 2.860194169683911; 0.01286062523971824, 0.9765526069572313, 1.203057387073405]

1400706429 1072698130 -566786328 -428060329 1066030763 1085705763

The first one seems to be reasonable, but the second one is totally a mess. I suppose the problem occurs when forcing CV_32SC1 to int but I don't know how to convert the data type properly.