/** <summary>
* {@link #addARMarker(INyARRgbRaster, int, int, double)}It is a wrapper. I make a marker pattern from Bitmap.
* The arguments are{@link #addARMarker(INyARRgbRaster, int, int, double)}Please refer to the.
*
* </summary>
* <param name="i_img"></param>
* <param name="i_patt_resolution">I specify the resolution of the marker to be generated.</param>
* <param name="i_patt_edge_percentage">Specifies the percentage of the edge region of the image.</param>
* <param name="i_marker_size">I specify the physical size of the marker.</param>
* <returns></returns>
**/
public int addARMarker(Texture2D i_img, int i_patt_resolution, int i_patt_edge_percentage, double i_marker_size)
{
int w = i_img.width;
int h = i_img.height;
NyARUnityRaster ur = new NyARUnityRaster(i_img);
NyARCode c = new NyARCode(i_patt_resolution, i_patt_resolution);
//Marker pattern cut out from a raster
INyARPerspectiveCopy pc = (INyARPerspectiveCopy)ur.createInterface(typeof(INyARPerspectiveCopy));
NyARRgbRaster tr = new NyARRgbRaster(i_patt_resolution, i_patt_resolution);
pc.copyPatt(0, 0, w, 0, w, h, 0, h, i_patt_edge_percentage, i_patt_edge_percentage, 4, tr);
//Set the pattern cut
c.setRaster(tr);
return base.addARMarker(c, i_patt_edge_percentage, i_marker_size);
}