1 2008.04.06 version 0.7.20080406.0
\r
5 --キャプチャ画像のBGRをRGBとして評価していたのを修正
\r
6 --JMFキャプチャ画像ピクセルフォーマット認識の自動化
\r
11 Index: D:/project.files/java.Lab/NyARToolKit/sample/jogl/JavaSimpleLite.java
\r
12 ===================================================================
\r
13 --- D:/project.files/java.Lab/NyARToolKit/sample/jogl/JavaSimpleLite.java (revision 172)
\r
14 +++ D:/project.files/java.Lab/NyARToolKit/sample/jogl/JavaSimpleLite.java (revision 173)
\r
19 - capture=new JmfCameraCapture(320,240,15f,JmfCameraCapture.PIXCEL_FORMAT_RGB);
\r
20 + capture=new JmfCameraCapture(320,240,15f,JmfCameraCapture.PIXEL_FORMAT_RGB);
\r
21 capture.setCaptureListener(this);
\r
24 ar_param=new GLNyARParam();
\r
25 NyARCode ar_code =new NyARCode(16,16);
\r
27 nya=new GLNyARSingleDetectMarker(ar_param,ar_code,80.0);
\r
28 ar_code.loadFromARFile(CARCODE_FILE);
\r
30 - cap_image=new GLNyARRaster_RGB(gl,ar_param,320,240);
\r
32 + cap_image=new GLNyARRaster_RGB(gl,ar_param);
\r
35 }catch(Exception e){
\r
36 e.printStackTrace();
\r
38 @@ -166,17 +166,10 @@
\r
42 - gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // Clear the buffers for new frame.
\r
46 - Buffer b=capture.readBuffer();
\r
47 - //BufferToImage b2i=new BufferToImage((VideoFormat)b.getFormat());
\r
48 - if(b.getData()==null){
\r
49 + if(!cap_image.hasData()){
\r
55 + gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // Clear the buffers for new frame.
\r
56 //画像チェックしてマーカー探して、背景を書く
\r
57 boolean is_marker_exist;
\r
58 synchronized(cap_image){
\r
62 synchronized(cap_image){
\r
63 - cap_image.setRawData((byte[])i_buffer.getData(), true);
\r
64 + cap_image.setBuffer(i_buffer, true);
\r
66 }catch(Exception e){
\r
67 e.printStackTrace();
\r
68 Index: D:/project.files/java.Lab/NyARToolKit/sample/jogl/jp/nyatla/nyartoolkit/gutil/GLNyARRaster_RGB.java
\r
69 ===================================================================
\r
70 --- D:/project.files/java.Lab/NyARToolKit/sample/jogl/jp/nyatla/nyartoolkit/gutil/GLNyARRaster_RGB.java (revision 172)
\r
71 +++ D:/project.files/java.Lab/NyARToolKit/sample/jogl/jp/nyatla/nyartoolkit/gutil/GLNyARRaster_RGB.java (revision 173)
\r
74 - * NyARRaster_RGBにOpenGL向け関数を追加したもの
\r
75 + * NyARRaster_RGBにOpenGL向け関数を追加したものです。
\r
78 * airmail(at)ebony.plala.or.jp
\r
81 import javax.media.opengl.GL;
\r
82 import javax.media.opengl.glu.GLU;
\r
84 +import jp.nyatla.nyartoolkit.NyARException;
\r
85 import jp.nyatla.nyartoolkit.core.NyARParam;
\r
86 -import jp.nyatla.nyartoolkit.core.raster.NyARRaster_RGB;
\r
87 +import jp.nyatla.nyartoolkit.jmfutil.*;
\r
89 -public class GLNyARRaster_RGB extends NyARRaster_RGB
\r
90 +public class GLNyARRaster_RGB extends JmfNyARRaster_RGB
\r
92 private NyARParam cparam;
\r
95 - public GLNyARRaster_RGB(GL i_ref_gl,NyARParam i_cparam,int i_width,int i_height)
\r
96 + private byte[] gl_buf;
\r
97 + private int gl_flag;
\r
99 + public GLNyARRaster_RGB(GL i_ref_gl,NyARParam i_cparam)
\r
103 + super(i_cparam.getX(),i_cparam.getY());
\r
104 + gl_flag=GL.GL_RGB;
\r
108 - this.ref_buf=new byte[i_width*i_height*3];
\r
109 + this.gl_buf=new byte[width*height*3];
\r
111 - public void setRawData(byte[] i_buf,boolean i_is_reverse)
\r
112 + public void setBuffer(javax.media.Buffer i_buffer,boolean i_is_reverse) throws NyARException
\r
114 + super.setBuffer(i_buffer);
\r
115 + //メモ:この時点では、ref_dataにはi_bufferの参照値が入ってる。
\r
119 int length=width*3;
\r
121 int dest_idx=(height-1)*length;
\r
122 for(int i=0;i<height;i++){
\r
123 - System.arraycopy(i_buf,src_idx,ref_buf,dest_idx,length);
\r
124 + System.arraycopy(ref_buf,src_idx,gl_buf,dest_idx,length);
\r
129 - System.arraycopy(i_buf,0,ref_buf,0,this.ref_buf.length);
\r
130 + System.arraycopy(ref_buf,0,gl_buf,0,this.ref_buf.length);
\r
133 + switch(this.pix_type){
\r
134 + case GLNyARRaster_RGB.PIXEL_ORDER_BGR:
\r
135 + gl_flag=GL.GL_BGR;
\r
137 + case GLNyARRaster_RGB.PIXEL_ORDER_RGB:
\r
138 + gl_flag=GL.GL_RGB;
\r
141 + throw new NyARException();
\r
143 + //ref_bufをgl_bufに差し替える
\r
147 * 保持してるイメージをGLに出力する。
\r
148 @@ -104,15 +126,13 @@
\r
151 IntBuffer params=IntBuffer.allocate(4);
\r
152 - int xsize=cparam.getX();
\r
153 - int ysize=cparam.getY();
\r
154 zoomf = (float)zoom;
\r
155 ref_gl.glDisable(GL.GL_TEXTURE_2D);
\r
156 ref_gl.glGetIntegerv(GL.GL_VIEWPORT,params);
\r
157 - ref_gl.glPixelZoom(zoomf * ((float)(params.get(2)) / (float)xsize),-zoomf * ((float)(params.get(3)) / (float)ysize));
\r
158 + ref_gl.glPixelZoom(zoomf * ((float)(params.get(2)) / (float)width),-zoomf * ((float)(params.get(3)) / (float)height));
\r
159 ref_gl.glRasterPos2i(-1,1);
\r
160 ref_gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);
\r
161 ByteBuffer buf=ByteBuffer.wrap(ref_buf);
\r
162 - ref_gl.glDrawPixels(xsize,ysize,GL.GL_BGR,GL.GL_UNSIGNED_BYTE,buf);
\r
163 + ref_gl.glDrawPixels(width,height,gl_flag,GL.GL_UNSIGNED_BYTE,buf);
\r
166 Index: D:/project.files/java.Lab/NyARToolKit/sample/jmf/JmfCaptureTest.java
\r
167 ===================================================================
\r
168 --- D:/project.files/java.Lab/NyARToolKit/sample/jmf/JmfCaptureTest.java (revision 172)
\r
169 +++ D:/project.files/java.Lab/NyARToolKit/sample/jmf/JmfCaptureTest.java (revision 173)
\r
172 setTitle("JmfCaptureTest");
\r
173 setBounds(0,0,320+64,240+64);
\r
174 - capture=new JmfCameraCapture(320,240,30f,JmfCameraCapture.PIXCEL_FORMAT_RGB);
\r
175 + capture=new JmfCameraCapture(320,240,30f,JmfCameraCapture.PIXEL_FORMAT_RGB);
\r
176 capture.setCaptureListener(this);
\r
179 Index: D:/project.files/java.Lab/NyARToolKit/sample/jmf/jp/nyatla/nyartoolkit/jmfutil/JmfNyARRaster_RGB.java
\r
180 ===================================================================
\r
181 --- D:/project.files/java.Lab/NyARToolKit/sample/jmf/jp/nyatla/nyartoolkit/jmfutil/JmfNyARRaster_RGB.java (revision 0)
\r
182 +++ D:/project.files/java.Lab/NyARToolKit/sample/jmf/jp/nyatla/nyartoolkit/jmfutil/JmfNyARRaster_RGB.java (revision 173)
\r
185 + * RGB形式のJMFバッファをラップするNyARRasterです。
\r
186 + * 複数のピクセルの並び順に対応してます。
\r
187 + * (c)2008 R.iizuka
\r
188 + * airmail(at)ebony.plala.or.jp
\r
189 + * http://nyatla.jp/
\r
191 +package jp.nyatla.nyartoolkit.jmfutil;
\r
194 +import javax.media.format.RGBFormat;
\r
195 +import java.awt.Dimension;
\r
196 +import jp.nyatla.nyartoolkit.NyARException;
\r
197 +import jp.nyatla.nyartoolkit.core.raster.NyARRaster;
\r
200 +public class JmfNyARRaster_RGB implements NyARRaster
\r
202 + public final static int PIXEL_ORDER_RGB=1;
\r
203 + public final static int PIXEL_ORDER_BGR=2;
\r
204 + protected int pix_type;
\r
205 + private int red_idx;
\r
206 + private int green_idx;
\r
207 + private int blue_idx;
\r
208 + protected byte[] ref_buf;
\r
209 + protected int width=0;
\r
210 + protected int height=0;
\r
213 + * RGB形式のJMFバッファをラップするオブジェクトをつくります。
\r
214 + * 生成直後のオブジェクトはデータを持ちません。
\r
215 + * メンバ関数はsetBufferを実行後に使用可能になります。
\r
217 + public JmfNyARRaster_RGB(int i_width,int i_height)
\r
224 + * javax.media.Bufferを分析して、その分析結果をNyARRasterに適合する形で保持します。
\r
225 + * 関数実行後に外部でi_bufferの内容変更した場合には、再度setBuffer関数を呼び出してください。
\r
226 + * @param i_buffer
\r
227 + * RGB形式のデータを格納したjavax.media.Bufferオブジェクトを指定してください。
\r
229 + * i_bufferをラップしたオブジェクトを返します。
\r
230 + * @throws NyARException
\r
232 + public void setBuffer(javax.media.Buffer i_buffer) throws NyARException
\r
234 + RGBFormat fmt=(RGBFormat)i_buffer.getFormat();
\r
236 + Dimension s=fmt.getSize();
\r
237 + if(width!=s.width || height !=s.height){
\r
238 + throw new NyARException();
\r
241 + red_idx =fmt.getRedMask()-1;
\r
242 + green_idx=fmt.getGreenMask()-1;
\r
243 + blue_idx =fmt.getBlueMask()-1;
\r
246 + if(red_idx==0 && blue_idx==2){
\r
247 + pix_type=PIXEL_ORDER_RGB;
\r
248 + }else if(red_idx==2 && blue_idx==0){
\r
249 + pix_type=PIXEL_ORDER_BGR;
\r
251 + throw new NyARException("Unknown pixel order.");
\r
253 + ref_buf=(byte[])i_buffer.getData();
\r
255 + public int getPixelTotal(int i_x,int i_y)
\r
257 + int bp=(i_x+i_y*width)*3;
\r
258 + return (ref_buf[bp] & 0xff)+(ref_buf[bp+1] & 0xff)+(ref_buf[bp+2] & 0xff);
\r
260 + public int getWidth()
\r
264 + public int getHeight()
\r
268 + public void pickRgbArray(int i_x,int i_y,int[] i_rgb)
\r
270 + int bp=(i_x+i_y*width)*3;
\r
271 + i_rgb[0]=(ref_buf[bp+red_idx] & 0xff);//R
\r
272 + i_rgb[1]=(ref_buf[bp+green_idx] & 0xff);//G
\r
273 + i_rgb[2]=(ref_buf[bp+blue_idx] & 0xff);//B
\r
276 + * ピクセルの順序タイプを返します。
\r
280 + public int getPixelOrder()
\r
285 + * データを持っているかを返します。
\r
288 + public boolean hasData()
\r
290 + return ref_buf!=null;
\r
294 Index: D:/project.files/java.Lab/NyARToolKit/sample/jmf/jp/nyatla/nyartoolkit/jmf/JmfCameraCapture.java
\r
295 ===================================================================
\r
296 --- D:/project.files/java.Lab/NyARToolKit/sample/jmf/jp/nyatla/nyartoolkit/jmf/JmfCameraCapture.java (revision 172)
\r
297 +++ D:/project.files/java.Lab/NyARToolKit/sample/jmf/jp/nyatla/nyartoolkit/jmf/JmfCameraCapture.java (revision 173)
\r
300 public class JmfCameraCapture
\r
302 + private Dimension image_size;
\r
303 private JmfCaptureListener capture_listener;
\r
304 private DataSource jmf_data_source;
\r
305 private MonitorStream jmf_monitor_stream;
\r
306 @@ -31,13 +32,17 @@
\r
307 private VideoFormat jmf_video_format;
\r
309 private Buffer read_buf=new Buffer();
\r
310 - public static final String PIXCEL_FORMAT_RGB="RGB";
\r
311 + public static final String PIXEL_FORMAT_RGB="RGB";
\r
312 public JmfCameraCapture(int i_width,int i_height,float i_rate,String i_pixcel_format)
\r
314 String encoding = i_pixcel_format;//comboEncoding.getSelectedItem();
\r
315 - Dimension size = new Dimension(i_width,i_height);
\r
316 - jmf_video_format = new VideoFormat(encoding, size, Format.NOT_SPECIFIED,null,i_rate);
\r
317 + image_size = new Dimension(i_width,i_height);
\r
318 + jmf_video_format = new VideoFormat(encoding, image_size, Format.NOT_SPECIFIED,null,i_rate);
\r
320 + public Dimension getSize()
\r
322 + return image_size;
\r
324 public javax.media.Buffer readBuffer() throws NyARException
\r
326 if(jmf_monitor_stream==null){
\r
327 Index: D:/project.files/java.Lab/NyARToolKit/sample/jmf/NyarToolkitLinkTest.java
\r
328 ===================================================================
\r
329 --- D:/project.files/java.Lab/NyARToolKit/sample/jmf/NyarToolkitLinkTest.java (revision 172)
\r
330 +++ D:/project.files/java.Lab/NyARToolKit/sample/jmf/NyarToolkitLinkTest.java (revision 173)
\r
333 import jp.nyatla.nyartoolkit.NyARException;
\r
334 import jp.nyatla.nyartoolkit.jmf.*;
\r
336 +import jp.nyatla.nyartoolkit.jmfutil.*;
\r
339 import jp.nyatla.nyartoolkit.core.*;
\r
340 @@ -29,13 +29,14 @@
\r
341 private final String PARAM_FILE ="../../Data/camera_para.dat";
\r
342 private JmfCameraCapture capture;
\r
343 NyARSingleDetectMarker nya;
\r
344 + JmfNyARRaster_RGB raster;
\r
346 public NyarToolkitLinkTest() throws NyARException,NyARException
\r
348 setTitle("JmfCaptureTest");
\r
349 setBounds(0,0,320+64,240+64);
\r
351 - capture=new JmfCameraCapture(320,240,30f,JmfCameraCapture.PIXCEL_FORMAT_RGB);
\r
352 + capture=new JmfCameraCapture(320,240,30f,JmfCameraCapture.PIXEL_FORMAT_RGB);
\r
353 capture.setCaptureListener(this);
\r
357 ar_param.changeSize(320,240);
\r
358 nya=new NyARSingleDetectMarker(ar_param,ar_code,80.0);
\r
359 ar_code.loadFromARFile(CARCODE_FILE);
\r
360 + //キャプチャイメージ用のラスタを準備
\r
361 + raster=new JmfNyARRaster_RGB(320,240);
\r
365 @@ -52,15 +55,18 @@
\r
366 public void onUpdateBuffer(Buffer i_buffer)
\r
370 + //キャプチャしたバッファをラスタにセット
\r
371 + raster.setBuffer(i_buffer);
\r
373 + //キャプチャしたイメージを表示用に加工
\r
374 BufferToImage b2i=new BufferToImage((VideoFormat)i_buffer.getFormat());
\r
375 Image img=b2i.createImage(i_buffer);
\r
376 - Graphics g = getGraphics();
\r
377 - NyARRaster_RGB ra=NyARRaster_RGB.wrap((byte[])i_buffer.getData(), 320, 240);
\r
379 - boolean is_marker_exist=nya.detectMarkerLite(ra,100);
\r
382 + Graphics g = getGraphics();
\r
383 double[][] atm=null;
\r
386 + boolean is_marker_exist=nya.detectMarkerLite(raster,100);
\r
387 if(is_marker_exist){
\r
389 atm=nya.getTransmationMatrix().getArray();
\r
390 Index: D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_Blank.java
\r
391 ===================================================================
\r
392 --- D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_Blank.java (revision 172)
\r
393 +++ D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_Blank.java (revision 173)
\r
394 @@ -38,16 +38,15 @@
\r
396 public class NyARRaster_Blank implements NyARRaster
\r
400 + private int width;
\r
401 + private int height;
\r
402 public NyARRaster_Blank(int i_width,int i_height)
\r
404 - NyARRaster_BGRA new_inst=new NyARRaster_BGRA();
\r
405 - new_inst.width =i_width;
\r
406 - new_inst.height =i_height;
\r
408 + height =i_height;
\r
411 - public int getPixcelTotal(int i_x,int i_y)
\r
412 + public int getPixelTotal(int i_x,int i_y)
\r
418 public void pickRgbArray(int i_x,int i_y,int[] i_rgb)
\r
428 Index: D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_RGB.java
\r
429 ===================================================================
\r
430 --- D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_RGB.java (revision 172)
\r
431 +++ D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_RGB.java (revision 173)
\r
432 @@ -39,32 +39,32 @@
\r
433 protected int height;
\r
434 public static NyARRaster_RGB wrap(byte[] i_buffer,int i_width,int i_height)
\r
436 - NyARRaster_RGB new_inst=new NyARRaster_RGB();
\r
437 - new_inst.ref_buf=i_buffer;
\r
438 - new_inst.width =i_width;
\r
439 - new_inst.height =i_height;
\r
441 + NyARRaster_RGB new_inst=new NyARRaster_RGB();
\r
442 + new_inst.ref_buf=i_buffer;
\r
443 + new_inst.width =i_width;
\r
444 + new_inst.height =i_height;
\r
448 - public int getPixcelTotal(int i_x,int i_y)
\r
449 + public int getPixelTotal(int i_x,int i_y)
\r
451 - int bp=(i_x+i_y*width)*3;
\r
452 - return (ref_buf[bp] & 0xff)+(ref_buf[bp+1] & 0xff)+(ref_buf[bp+2] & 0xff);
\r
453 + int bp=(i_x+i_y*width)*3;
\r
454 + return (ref_buf[bp] & 0xff)+(ref_buf[bp+1] & 0xff)+(ref_buf[bp+2] & 0xff);
\r
456 public int getWidth()
\r
461 public int getHeight()
\r
466 public void pickRgbArray(int i_x,int i_y,int[] i_rgb)
\r
468 - int bp=(i_x+i_y*width)*3;
\r
469 - i_rgb[0]=(ref_buf[bp+0] & 0xff);//R
\r
470 - i_rgb[1]=(ref_buf[bp+1] & 0xff);//G
\r
471 - i_rgb[2]=(ref_buf[bp+2] & 0xff);//B
\r
472 + int bp=(i_x+i_y*width)*3;
\r
473 + i_rgb[0]=(ref_buf[bp+0] & 0xff);//R
\r
474 + i_rgb[1]=(ref_buf[bp+1] & 0xff);//G
\r
475 + i_rgb[2]=(ref_buf[bp+2] & 0xff);//B
\r
479 Index: D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_BGRA.java
\r
480 ===================================================================
\r
481 --- D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_BGRA.java (revision 172)
\r
482 +++ D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_BGRA.java (revision 173)
\r
483 @@ -35,25 +35,25 @@
\r
484 public class NyARRaster_BGRA implements NyARRaster
\r
486 private byte[] ref_buf;
\r
489 + private int width;
\r
490 + private int height;
\r
491 public static NyARRaster_BGRA wrap(byte[] i_buffer,int i_width,int i_height)
\r
493 - NyARRaster_BGRA new_inst=new NyARRaster_BGRA();
\r
494 - new_inst.ref_buf=i_buffer;
\r
495 - new_inst.width =i_width;
\r
496 - new_inst.height =i_height;
\r
498 + NyARRaster_BGRA new_inst=new NyARRaster_BGRA();
\r
499 + new_inst.ref_buf=i_buffer;
\r
500 + new_inst.width =i_width;
\r
501 + new_inst.height =i_height;
\r
505 - public int getPixcelTotal(int i_x,int i_y)
\r
506 + public int getPixelTotal(int i_x,int i_y)
\r
508 - int bp=(i_x+i_y*width)*4;
\r
509 - return (ref_buf[bp] & 0xff)+(ref_buf[bp+1] & 0xff)+(ref_buf[bp+2] & 0xff);
\r
510 + int bp=(i_x+i_y*width)*4;
\r
511 + return (ref_buf[bp] & 0xff)+(ref_buf[bp+1] & 0xff)+(ref_buf[bp+2] & 0xff);
\r
513 public int getWidth()
\r
518 public int getHeight()
\r
520 @@ -61,10 +61,10 @@
\r
522 public void pickRgbArray(int i_x,int i_y,int[] i_rgb)
\r
524 - int bp=(i_x+i_y*width)*4;
\r
525 - i_rgb[0]=(ref_buf[bp+2] & 0xff);//R
\r
526 - i_rgb[1]=(ref_buf[bp+1] & 0xff);//G
\r
527 - i_rgb[2]=(ref_buf[bp+0] & 0xff);//B
\r
528 + int bp=(i_x+i_y*width)*4;
\r
529 + i_rgb[0]=(ref_buf[bp+2] & 0xff);//R
\r
530 + i_rgb[1]=(ref_buf[bp+1] & 0xff);//G
\r
531 + i_rgb[2]=(ref_buf[bp+0] & 0xff);//B
\r
535 Index: D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster.java
\r
536 ===================================================================
\r
537 --- D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster.java (revision 172)
\r
538 +++ D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster.java (revision 173)
\r
541 public interface NyARRaster{
\r
543 - public int getPixcelTotal(int i_x,int i_y);
\r
544 + public int getPixelTotal(int i_x,int i_y);
\r
545 public int getWidth();
\r
546 public int getHeight();
\r
547 public void pickRgbArray(int i_x,int i_y,int[] i_rgb);
\r
548 Index: D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/NyARLabeling.java
\r
549 ===================================================================
\r
550 --- D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/NyARLabeling.java (revision 172)
\r
551 +++ D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/NyARLabeling.java (revision 173)
\r
552 @@ -206,7 +206,7 @@
\r
554 for(int i = 1; i < lxsize-1; i++, nya_pnt_start_x+=nya_poff_step) {//for(int i = 1; i < lxsize-1; i++, pnt+=poff, pnt2++) {
\r
555 //RGBの合計値が閾値より大きいかな?
\r
556 - if(image.getPixcelTotal(nya_pnt_start_x,nya_pnt_start_y)<=thresht3){
\r
557 + if(image.getPixelTotal(nya_pnt_start_x,nya_pnt_start_y)<=thresht3){
\r
558 //pnt1 = ShortPointer.wrap(pnt2, -lxsize);//pnt1 = &(pnt2[-lxsize]);
\r
559 if(label_img[p1][i]>0){//if( *pnt1 > 0 ) {
\r
560 label_img[p2][i]=label_img[p1][i];//*pnt2 = *pnt1;
\r
561 Index: D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/NyARSquare.java
\r
562 ===================================================================
\r
563 --- D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/NyARSquare.java (revision 172)
\r
564 +++ D:/project.files/java.Lab/NyARToolKit/src/jp/nyatla/nyartoolkit/core/NyARSquare.java (revision 173)
\r
565 @@ -36,19 +36,19 @@
\r
568 public class NyARSquare{
\r
569 - private NyARMarker marker;
\r
571 - public double[] pos;
\r
572 - public double[][] line; //double[4][3]
\r
573 - public double[][] vertex;//double[4][2];
\r
574 + private NyARMarker marker;
\r
576 + public double[] pos;
\r
577 + public double[][] line; //double[4][3]
\r
578 + public double[][] vertex;//double[4][2];
\r
579 public NyARSquare(NyARMarker i_marker,double[][] i_attached_line,double[][] i_attached_vertex)
\r
581 - //ARSquareは、ARMarkerを完全にラップするようにした。
\r
583 - area=i_marker.area;
\r
584 - pos =i_marker.pos;
\r
585 - line =i_attached_line;
\r
586 - vertex=i_attached_vertex;
\r
587 + //ARSquareは、ARMarkerを完全にラップするようにした。
\r
589 + area=i_marker.area;
\r
590 + pos =i_marker.pos;
\r
591 + line =i_attached_line;
\r
592 + vertex=i_attached_vertex;
\r
594 public NyARMarker getMarker()
\r