¡@

Home 

2014/10/15 ¤U¤È 10:10:12

iphone Programming Glossary: imagevertices

How do I blend two textures with different co-ordinates in OpenGL ES 2.0 on iPhone?

http://stackoverflow.com/questions/12242443/how-do-i-blend-two-textures-with-different-co-ordinates-in-opengl-es-2-0-on-ipho

alpha glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glVertexAttribPointer position 2 GL_FLOAT 0 0 imageVertices glVertexAttribPointer inputTextureCoordinate 2 GL_FLOAT 0 0 textureCoordinates glClearColor 0.0 0.0 0.0 0.0 glClear GL_COLOR_BUFFER_BIT..

adjust corners and crop the image openCV

http://stackoverflow.com/questions/13098073/adjust-corners-and-crop-the-image-opencv

scale factor is taken into account int paperHeight 297 in mm because scale factor is taken into account cv Point2f imageVertices 4 float distanceP1P2 float distanceP1P3 BOOL isLandscape true int scaleFactor cv Mat paperImage cv Mat paperImageCorrected.. further operations square sortSquarePointsClockwise square rearrange to get proper order for getPerspectiveTransform imageVertices 0 square 0 imageVertices 1 square 1 imageVertices 2 square 3 imageVertices 3 square 2 get distance between corner points.. sortSquarePointsClockwise square rearrange to get proper order for getPerspectiveTransform imageVertices 0 square 0 imageVertices 1 square 1 imageVertices 2 square 3 imageVertices 3 square 2 get distance between corner points for further operations distanceP1P2..