# Revision history [back]

### How to build LUT for IPM

Hi, I want to build a lookup table to use with inverse perspective mapping. Instead of applying warpPerspective with the transform matrix on each frame, I want to use a lookup table (LUT).

Right now I use the following code to generate the transformation matrix

src.put(0, 0, 200,260, 340,260, 440,330,  40,330);
dst.put(0, 0, 220,190, 400,190, 400,400, 220,400);
m = new Mat(3, 3, CvType.CV_32FC1);
m = Imgproc.getPerspectiveTransform(src, dst);


In the onCameraFrame() I apply the warpPerspective() function. How can I build a LUT knowing some input pixels on the original frame and their correspondences in the output frame, and knowing the transfromation matrix??

 2 No.2 Revision StevenPuttemans 19848 ●14 ●82 ●205 http://stevenputtemans...

### How to build LUT lookup table for IPMinverse perspective mapping?

Hi, I want to build a lookup table to use with inverse perspective mapping. Instead of applying warpPerspective with the transform matrix on each frame, I want to use a lookup table (LUT).

Right now I use the following code to generate the transformation matrix

src.put(0, 0, 200,260, 340,260, 440,330,  40,330);
dst.put(0, 0, 220,190, 400,190, 400,400, 220,400);
m = new Mat(3, 3, CvType.CV_32FC1);
m = Imgproc.getPerspectiveTransform(src, dst);


In the onCameraFrame() I apply the warpPerspective() function. How can I build a LUT knowing some input pixels on the original frame and their correspondences in the output frame, and knowing the transfromation matrix??

### How to build lookup table for inverse perspective mapping?

Hi, I want to build a lookup table to use with inverse perspective mapping. Instead of applying warpPerspective with the transform matrix on each frame, I want to use a lookup table (LUT).

Right now I use the following code to generate the transformation matrix

src.put(0, 0, 200,260, 340,260, 440,330,  40,330);
dst.put(0, 0, 220,190, 400,190, 400,400, 220,400);
m = new Mat(3, 3, CvType.CV_32FC1);
m = Imgproc.getPerspectiveTransform(src, dst);


In the onCameraFrame() I apply the warpPerspective() function. How can I build a LUT knowing some input pixels on the original frame and their correspondences in the output frame, and knowing the transfromation matrix??