Modules-old/ImageProcRobocup/lua_ImageProc.cpp
//For OP
//bitwise OR using tilted bounding box
For OP
bitwise OR using tilted bounding box
For OP bitwise OR using tilted bounding box
static int lua_tilted_block_bitor(lua_State *L) {
  uint8_t *label = (uint8_t *) lua_touserdata(L, 1);
  if ((label == NULL) || !lua_islightuserdata(L, 1)) {
    return luaL_error(L, "Input LABEL not light user data");
  }
  int mx = luaL_checkint(L, 2);
  int nx = luaL_checkint(L, 3);
  int msub = luaL_checkint(L, 4);
  int nsub = luaL_checkint(L, 5);
  double tiltAngle = luaL_optnumber(L, 6, 0.0);
  uint8_t *block = tilted_block_bitor(label, mx, nx, msub, nsub, tiltAngle );
  lua_pushlightuserdata(L, block);
  return 1;
}
static int lua_tilted_block_bitor ( lua_State * L ) { uint8_t * label = ( uint8_t * ) lua_touserdata ( L , 1 ) ; if ( ( label == NULL ) || ! lua_islightuserdata ( L , 1 ) ) { return luaL_error ( L , " " ) ; } int mx = luaL_checkint ( L , 2 ) ; int nx = luaL_checkint ( L , 3 ) ; int msub = luaL_checkint ( L , 4 ) ; int nsub = luaL_checkint ( L , 5 ) ; double tiltAngle = luaL_optnumber ( L , 6 , 0.0 ) ; uint8_t * block = tilted_block_bitor ( label , mx , nx , msub , nsub , tiltAngle ) ; lua_pushlightuserdata ( L , block ) ; return 1 ; }
For OP
bitwise OR using tilted bounding box
For OP bitwise OR using tilted bounding box