import com.sun.opengl.util.Animator;\r
\r
import jp.nyatla.nyartoolkit.core.NyARCode;\r
-import jp.nyatla.nyartoolkit.core.raster.NyARGlayscaleRaster;\r
-import jp.nyatla.nyartoolkit.core.rasteranalyzer.threshold.NyARRasterThresholdAnalyzer_SlidePTile;\r
-import jp.nyatla.nyartoolkit.core2.NyARRasterFilter_RgbAve;\r
\r
import jp.nyatla.nyartoolkit.jmf.utils.JmfCameraCapture;\r
import jp.nyatla.nyartoolkit.jmf.utils.JmfCaptureListener;\r
//画像チェックしてマーカー探して、背景を書く\r
boolean is_marker_exist;\r
synchronized (_cap_image) {\r
- is_marker_exist = _nya.detectMarkerLite(_cap_image, threshold);\r
+ is_marker_exist = _nya.detectMarkerLite(_cap_image, 110);\r
//背景を書く\r
_glnya.drawBackGround(_cap_image, 1.0);\r
}\r
}\r
\r
}\r
- int threshold;\r
- final NyARRasterThresholdAnalyzer_SlidePTile th=new NyARRasterThresholdAnalyzer_SlidePTile(15);\r
- final NyARGlayscaleRaster gs=new NyARGlayscaleRaster(320,240);\r
- final NyARRasterFilter_RgbAve togs=new NyARRasterFilter_RgbAve();\r
public void onUpdateBuffer(Buffer i_buffer)\r
{\r
try {\r
synchronized (_cap_image) {\r
_cap_image.setBuffer(i_buffer, true);\r
- //閾値計算(めんどくさいから一時的に自動調整にしとく。)\r
- togs.doFilter(_cap_image, gs);\r
- th.analyzeRaster(gs);\r
- threshold=110;//th.getThreshold();\r
}\r
} catch (Exception e) {\r
e.printStackTrace();\r
--- /dev/null
+package jp.nyatla.nyartoolkit.core;\r
+\r
+import jp.nyatla.nyartoolkit.NyARException;\r
+import jp.nyatla.nyartoolkit.core.raster.NyARBinRaster;\r
+\r
+public interface INyARSquareDetector\r
+{\r
+ public void detectMarker(NyARBinRaster i_raster, NyARSquareStack o_square_stack) throws NyARException;\r
+}\r
import jp.nyatla.nyartoolkit.core.labeling.*;
import jp.nyatla.nyartoolkit.core.labeling.types.*;
import jp.nyatla.nyartoolkit.core.raster.*;
-import jp.nyatla.nyartoolkit.core.rasteranalyzer.*;
-import jp.nyatla.nyartoolkit.core.rasteranalyzer.threshold.*;
import jp.nyatla.nyartoolkit.core.rasterfilter.*;
-import jp.nyatla.nyartoolkit.core.rasterfilter.gs2bin.*;
import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2gs.*;
-import jp.nyatla.nyartoolkit.core2.NyARRasterFilter_RgbAve;
+import jp.nyatla.nyartoolkit.core2.rasteranalyzer.*;
+import jp.nyatla.nyartoolkit.core2.rasteranalyzer.threshold.*;
+import jp.nyatla.nyartoolkit.core2.rasterfilter.gs2bin.*;
+import jp.nyatla.nyartoolkit.core2.rasterfilter.rgb2gs.NyARRasterFilter_RgbAve;
import jp.nyatla.utils.j2se.LabelingBufferdImage;
public class LabelingCamera extends Frame implements JmfCaptureListener {
\r
import jp.nyatla.nyartoolkit.core.raster.*;\r
import jp.nyatla.nyartoolkit.core.raster.rgb.NyARRgbRaster_BGRA;\r
-import jp.nyatla.nyartoolkit.core.rasteranalyzer.*;\r
import jp.nyatla.nyartoolkit.core.labeling.*;\r
import jp.nyatla.nyartoolkit.core.labeling.types.*;\r
+import jp.nyatla.nyartoolkit.core2.rasteranalyzer.*;\r
import jp.nyatla.utils.j2se.*;\r
\r
public class LabelingTest extends Frame\r