JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java ME、Google Android 平台與 JavaCard 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 手機照相辨識二維條碼
seamaid925





發文: 8
積分: 0
於 2005-12-20 10:18 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
手機照相辨識二維條碼該如何自行開發程式

請大家教一下


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
bin1x





發文: 85
積分: 0
於 2005-12-20 10:57 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
這次資訊展,不是有家廠商就是做這個的
不過好像不是用照像來辨識的


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
seamaid925





發文: 8
積分: 0
於 2005-12-20 13:22 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請教一下

那是用什麼辨識的啊


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
bin1x





發文: 85
積分: 0
於 2005-12-20 15:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我是沒有注意看啦
就幾個人玩手機
然後就有一個小姐作簡介
說二維條碼的東西,像個超連結擺在手機中
聽她解釋之後,好像跟個圖示沒什麼兩樣


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:bin1x]
tempo



版主

發文: 645
積分: 7
於 2005-12-20 21:58 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
bin1x wrote:
我是沒有注意看啦
就幾個人玩手機
然後就有一個小姐作簡介
說二維條碼的東西,像個超連結擺在手機中
聽她解釋之後,好像跟個圖示沒什麼兩樣

用手機辨識 2 維條碼最早是由 NTT Docomo 開始應用, 使用者可以利用相機拍下名片, 雜誌, 廣告單上的 2 維條碼, 就可以直接導引到 2 維條碼內含的網址..
可以利用 google 找一下 qrcode, 就會有很多資訊..

至於要實作, 就我所知沒有任何的 open source project 可以直接利用..
semacode 有一些訊息, 可以參考一下..
http://www.semacode.com/


reply to postreply to post
Welcome to: gamelet.com
and my blog: www.pocketshark.com/blog/page/tempo
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
hungyi





發文: 53
積分: 0
於 2005-12-23 11:13 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
二維條碼是指QR code嗎?
ISO/IEC有這個的文件,不過要付費...
主要難度是「影像處理」的部份,其它的在文件中都說明的很清楚了!
抱歉,文件我不能提供,因為那是我畢專合作的公司出的錢!
如果您有學過「影像處理」的話,這個應該不難!


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
seamaid925





發文: 8
積分: 0
於 2005-12-24 02:20 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
感謝您提供寶貴意見

謝謝

您可否留下MAIL

跟您交流

期待您的回應


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
seamaid925





發文: 8
積分: 0
於 2005-12-24 07:36 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
是指
JAI(Java Advanced Imaging)
辨識原理嗎


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
seamaid925





發文: 8
積分: 0
於 2005-12-24 08:50 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
hungyi

您說
ISO/IEC有這個的文件

請教一下

ISO/IEC是指什麼
有網站嗎?

期待您能再提供一些資料如網站

我是ㄧ個研究生
從事學術性質研究

期待您的回應


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
robin

雞排小弟



發文: 481
積分: 1
於 2005-12-26 09:52 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
qrcode 網站
http://www.denso-wave.com/qrcode/index-e.html

ISO網站
http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=30789&scopelist=

Qrcode generator
http://nfg.2y.net/system/qrcodegen.php


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
cseserv





發文: 29
積分: 0
於 2006-01-05 11:05 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
seamaid925 wrote:
是指
JAI(Java Advanced Imaging)
辨識原理嗎

不是

是利用mmapi的capture能力讀入圖再進行影像處理


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
achif





發文: 1
積分: 0
於 2006-01-17 17:24 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
fyi
http://sourceforge.jp/projects/qrcode/

J2ME 請下載 qrcodeExample package.

下載後請改 code, recompile
不然程式只會抓 package 裡面的圖檔, 不會透過 MMAPI 抓圖
可參照 http://sourceforge.jp/forum/forum.php?thread_id=9729&forum_id=7252

SE W800i 試過可用


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:bin1x]
d8290342001





發文: 1
積分: 0
於 2006-07-25 09:47 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請大可以在教依次怎麼用手機照相辨識
因為我很好奇我的手機可不可以用
我的手機是nokia6270
真希望哪一個大大可以交我怎嚜灌軟體
or哪一個大大會寫手機照相辨識的java
可以教我嗎
真的很希望學會也真的很喜往我的手機可以用手機照相辨識真
感謝各位了


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
brian_tsim





發文: 12
積分: 0
於 2006-07-26 18:57 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hi all,

i have few question about QRCode.Please somebody help me.

Q1. If i want to use QRCode in business, whether need bought licence?

Q2. QRCode is support all phone(MIDP2.0)?

Q3. I want create new QRCode render(J2ME). Where have QRCode API?

Thanks,

Brian Tsim


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:brian_tsim]
tempo



版主

發文: 645
積分: 7
於 2006-07-26 23:43 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
brian_tsim wrote:
Hi all,

i have few question about QRCode.Please somebody help me.

Q1. If i want to use QRCode in business, whether need bought licence?

Q2. QRCode is support all phone(MIDP2.0)?

Q3. I want create new QRCode render(J2ME). Where have QRCode API?

Thanks,

Brian Tsim

Q1: QRCode spec is free to use/impl.
Q2: Only those phones with QRCode readers built in can read QRCode.
Q3: There in no QRCode API in J2ME specs.


reply to postreply to post
Welcome to: gamelet.com
and my blog: www.pocketshark.com/blog/page/tempo
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
brian_tsim





發文: 12
積分: 0
於 2006-07-27 11:36 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
http://sourceforge.jp/projects/qrcode/
本人試過下載j2me 及改 code, recompile,但本人用k700 做測試,但是每一次都出"COULD NOT DECODE",請問有進成功利用這個sample?


reply to postreply to post
作者 Re:手機照相辨識二維條碼(Sample Code) [Re:robin]
ryanpai





發文: 47
積分: 0
於 2007-03-01 09:57 user profilesend a private message to usersend email to ryanpaireply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
QR Code 編碼
=============================================
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*********************************************************
 *
 * Created on 2007年3月1日
 *
 * Program : QRCodeEncoderTest.java
 * @author : ryanpai
 * Java平台 : J2SDK 1.4.9
 * OS : XP
 * 1. 下載使用 (http://www.swetake.com/qr/ ) qrcode.jar
 *     => 建議改為qr_encode.jar
 *     (因為跟SourceForge QR Code Decode Library 之 qrcode.jar 同名)
 * 2. 將上述下載的 jar 增加至classpath
 *
 ********************************************************/
 
import com.swetake.util.Qrcode;
import java.io.*;
 
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;
 
/******************************************
 *
 * @author  Ryan Pai
 *
 ******************************************/
 
public class QRCodeEncoderTest {
    
    /** Creates a new instance of QRCodeEncoderTest */
    public QRCodeEncoderTest() {
    }
    
    /**
     * @param args the command line arguments
     */
    
    public static void main(String[] args) {
        
        try{
            
            // TODO code application logic here
            
            // Constructor Qrcode Object
            com.swetake.util.Qrcode testQrcode 
                  = new com.swetake.util.Qrcode();
            testQrcode.setQrcodeErrorCorrect('M');
            testQrcode.setQrcodeEncodeMode('B');
            testQrcode.setQrcodeVersion(7);
            
            // 設定QR Code 編碼內容
            String testString = "";
            testString = testString+"JavaWorld .\n";
            testString = testString+"中文Java討論網站\n";
            testString = testString+"http://www.javaworld.com\n";
            
            // getBytes
            byte[] d = testString.getBytes("Big5");
            
            // 設定圖檔寬度 140*140
            BufferedImage bi 
            = new BufferedImage(140, 140, BufferedImage.TYPE_INT_RGB);
            
            // createGraphics
            Graphics2D g = bi.createGraphics();
            
            // set background
            g.setBackground(Color.WHITE);
            g.clearRect(0, 0, 140, 140);
            
            // 設定字型顏色 => BLACK
            g.setColor(Color.BLACK);
            
            // 轉出 Bytes
            if (d.length>0 && d.length <120){
                boolean[][] s = testQrcode.calQrcode(d);
                for (int i=0;i<s.length;i++){
                    for (int j=0;j<s.length;j++){
                        if (s[j][i]) {
                            g.fillRect(j*3+2,i*3+2,3,3);
                        }
                    }
                }
            }
            
            g.dispose();
            bi.flush();
            
            // 設定 產生檔案路徑
            String FilePath="D:\\TestQRCode.jpg";
            File f = new File(FilePath);
            
            // 產生TestQRCode JPG File
            ImageIO.write(bi, "jpg", f);
            
        } // end try
        catch (Exception e) {
            e.printStackTrace();
        } // end catch
        
    } // end main
    
}
 


QR Code 解碼
=============================================
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*********************************************************
 *
 * Created on 2007年3月1日
 *
 * Program : QRCodeDecoderTest.java
 * @author : ryanpai
 * Java平台 : J2SDK 1.4.9
 * OS : XP
 * 1. 下載使用 (http://sourceforge.jp/projects/qrcode/ ) qrcode.jar
 *       => (SourceForge Open Source QR Code Decode Library)
 * 2. 修改官方 Sample => QRCodeDecoderCUIExample.java
 * 3. 將上述下載的 jar 增加至classpath
 *
 ********************************************************/
 
import jp.sourceforge.qrcode.codec.QRCodeDecoder;
import jp.sourceforge.qrcode.codec.data.QRCodeImage;
import jp.sourceforge.qrcode.codec.exception.DecodingFailedException;
import jp.sourceforge.qrcode.codec.exception.InvalidVersionInfoException;
 
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
 
/******************************************
 *
 * @author  RYANPAI
 *
 ******************************************/
 
public class QRCodeDecoderTest {
    
    /** Creates a new instance of QRCodeDecoderTest */
    public QRCodeDecoderTest() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        // TODO code application logic here
        QRCodeDecoder decoder = new QRCodeDecoder();
        
        // 設定讀取QR Code圖檔路徑
        File imageFile = new File("D:\\TestQRCode.jpg");
        
        // 設定 BufferedImage
        BufferedImage image = null;
        
        try {
            image = ImageIO.read(imageFile);
        } catch (IOException e) {
            System.out.println("Error: "+ e.getMessage());
        }
        try {
            String decodedData 
            = new String(decoder.decode(new J2SEImage(image)));
            System.out.println(decodedData);
        } catch (DecodingFailedException dfe) {
            System.out.println("Error: " + dfe.getMessage());
        }
        
        
    }
}
 
class J2SEImage implements QRCodeImage {
    BufferedImage image;
    
    public J2SEImage(BufferedImage image) {
        this.image = image;
    }
    
    public int getWidth() {
        return image.getWidth();
    }
    
    public int getHeight() {
        return image.getHeight();
    }
    
    public int getPixel(int x, int y) {
        return image.getRGB(x, y);
    }
    
}
 


ryanpai edited on 2007-03-06 09:50
reply to postreply to post
Ryan Pai
作者 Re:手機照相辨識二維條碼 [Re:achif]
axlchen





發文: 1
積分: 0
於 2007-03-01 16:37 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
achif wrote:
fyi
http://sourceforge.jp/projects/qrcode/

J2ME 請下載 qrcodeExample package.

下載後請改 code, recompile
不然程式只會抓 package 裡面的圖檔, 不會透過 MMAPI 抓圖
可參照 http://sourceforge.jp/forum/forum.php?thread_id=9729&forum_id=7252

SE W800i 試過可用


請教一下有 qrcode 開發經驗的大大們

這 decode lib 我有抓下來改了 ~ 並在手機 (SE K610i) 上實際執行
大致上除了辨識率有待加強外 ~ 其它都會滿 ok 的
唯一搞不定的是中文 ~
怎麻改都讀不出來, 要不就是讀了 show 不正確 (手機上實際執行)
(可是看樓上的大大在普通 jvm env 下 run 又 ok)

有啥米 key point 可以指點一下迷津嗎 ~ THX


reply to postreply to post
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
ryanpai





發文: 47
積分: 0
於 2007-03-06 09:48 user profilesend a private message to usersend email to ryanpaireply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hello achif,

應該是編碼規則的問題(改為UTF-8),
我的手機沒有內建QR Code解碼功能,
煩請你更改程式,再測試一下。

其中:
QRCodeEncoderTest.java

// getBytes
// byte[] d = testString.getBytes("Big5");

// 改為
byte[] d = testString.getBytes("UTF-8");

編譯執行後產生UTF-8之 QR Code



其中:
QRCodeDecoderTest.java

// String decodedData
// = new String(decoder.decode(new J2SEImage(image)));

// 改為
String decodedData
= new String(decoder.decode(new J2SEImage(image)),"UTF-8");


reply to postreply to post
Ryan Pai
作者 Re:手機照相辨識二維條碼(Sample Code) [Re:ryanpai]
richerhsu





發文: 3
積分: 0
於 2007-04-09 23:16 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
各位好!不好意思,我是java的新手,不知道該如何執行這個檔案。
可以麻煩教我步聚嗎?
每次執行都會有以下的錯誤:
java.io.IOException: Stream closed
  at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
  at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
  at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
  at java.io.FilterInputStream.read(FilterInputStream.java:90)
  at com.swetake.util.Qrcode.calQrcode(Qrcode.java:376)
  at QRCodeEncoderTest.main(QRCodeEncoderTest.java:77)
java.io.IOException: Stream closed
  at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
  at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
  at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
  at java.io.FilterInputStream.read(FilterInputStream.java:90)
  at com.swetake.util.Qrcode.calQrcode(Qrcode.java:416)
  at QRCodeEncoderTest.main(QRCodeEncoderTest.java:77)
java.lang.NullPointerException
  at com.swetake.util.Qrcode.calculateRSECC(Qrcode.java:607)
  at com.swetake.util.Qrcode.calQrcode(Qrcode.java:439)
  at QRCodeEncoderTest.main(QRCodeEncoderTest.java:77)
java.lang.ArrayIndexOutOfBoundsException: 0
  at com.swetake.util.Qrcode.calculateRSECC(Qrcode.java:630)
  at com.swetake.util.Qrcode.calQrcode(Qrcode.java:439)
  at QRCodeEncoderTest.main(QRCodeEncoderTest.java:77)

可以請教是怎麼回事嗎?


reply to postreply to post
Practice make perfect!!
作者 Re:手機照相辨識二維條碼(Sample Code) [Re:richerhsu]
ryanpai





發文: 47
積分: 0
於 2007-04-10 12:18 user profilesend a private message to usersend email to ryanpaireply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請參照壓縮檔內
QRCode測試程式執行步驟.pdf
及相關程式

TestQRCode.zip (132.37k)


reply to postreply to post
Ryan Pai
作者 Re:手機照相辨識二維條碼(Sample Code) [Re:ryanpai]
richerhsu





發文: 3
積分: 0
於 2007-04-10 15:39 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
您好,不好意思,我照您的步驟做完之後一樣的問題還是存在。
可以麻煩幫忙解答一下嗎?謝謝!


reply to postreply to post
Practice make perfect!!
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
ryanpai





發文: 47
積分: 0
於 2007-04-10 17:37 user profilesend a private message to usersend email to ryanpaireply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我測試跟執行都Ok

請將你的mail寄給我 (thmu_mis001@pchome.com.tw)
我再把完整的程式寄給你(因為含jar超過1M)
順便請教你的OS、J2SDK版本跟開發環境


reply to postreply to post
Ryan Pai
作者 Re:手機照相辨識二維條碼 [Re:seamaid925]
richerhsu





發文: 3
積分: 0
於 2007-04-12 01:30 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
另外可以再請教一下:
java.io.IOException: Stream closed
是什麼意思呢?

by the way…研究qrcode的人好像不多厚?在台灣找不太到相關的討論
是不實用嗎?還是…??


reply to postreply to post
Practice make perfect!!
作者 Re:手機照相辨識二維條碼 [Re:richerhsu]
ryanpai





發文: 47
積分: 0
於 2007-04-12 09:38 user profilesend a private message to usersend email to ryanpaireply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
----------------------------
java.io.IOException: Stream closed

java程式在處理例外事件丟出的訊息,example:

try{...}
catch(IOException ioe){....}
catch(Exception e){....}

如果不熟悉java的程式架構,
應該找2~3本java初階的書。

或者使用sun原廠的API說明文件,
配合java tutorials了解java的程式架構。

或者善用google或其他搜尋引擎,
搜尋 .java IOException
尋找相關資訊。

----------------------------
QRCode我也不甚了解,
公司總仔想使用二維條碼管理生產製程,
又說日本很多商品已使用QRCode行動條碼,
透過手機來增加行銷購物的便利性。

總仔問我如何?
我說沒聽過,竟然被他笑,
說玩資訊竟然不懂QRCode。

於是花了半天時間把Sample Code寫出,
僅此而已。

----------------------------
如果要學java,路還很長。
高手大多在國外,善用搜尋引擎找資料吧。


ryanpai edited on 2007-04-12 10:01
reply to postreply to post
Ryan Pai
go to first page go to previous page  1   2  go to next page go to last page
» JWorld@TW »  Java ME、Google Android 平台與 JavaCard 討論區

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8