我在qr解码器Matlab代码中得到未定义的错误。 [英] I am getting undefined error in qr decoder Matlab code .

查看:256
本文介绍了我在qr解码器Matlab代码中得到未定义的错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 ???未定义函数 方法'  BufferedImageLuminanceSource'用于类型的输入参数
' java.awt .image.BufferedImage'。
错误 ==> decode_qr at 55
source = BufferedImageLuminanceSource(jimg);

解决方案

< blockquote>你好,你必须从(https://repo1.maven.org/maven2/com/google/zxing/javase/3.3.0/和https://repo1.maven.org/maven2/下载3.3罐子COM /谷歌/斑马线/核心/ 3.3.0 /)。这些函数位于此matlab代码的不同文件夹中,因此您必须以这种方式更改导入:



对于编码功能:

 import com.google.zxing.qrcode。*; 
import com.google.zxing。*;



对于解码功能:

导入com.google .zxing.qrcode *。 
import com.google.zxing.client.j2se。*;
import com.google.zxing。*;
import com.google.zxing.common。*;
import com.google.zxing.Result。*;



还有其他更改:

在函数编码M_java.height和M_java.width无效,而是使用M_java.getHeight(),M_java.getWidth()



特别感谢Ari Bejarano( Java的Master)和Andres Puerto开发此解决方案。


??? Undefined function or method 'BufferedImageLuminanceSource' for input arguments of type
'java.awt.image.BufferedImage'.
Error in ==> decode_qr at 55
 source =BufferedImageLuminanceSource(jimg);

解决方案

Hello, you have to download the 3.3 jars from (https://repo1.maven.org/maven2/com/google/zxing/javase/3.3.0/ and https://repo1.maven.org/maven2/com/google/zxing/core/3.3.0/). These functions are inside differente folders for this matlab code, so you have to change the imports in this way:

For encode function:

import com.google.zxing.qrcode.*;
import com.google.zxing.*;


For decode function:

import com.google.zxing.qrcode.*;
import com.google.zxing.client.j2se.*;
import com.google.zxing.*;
import com.google.zxing.common.*;
import com.google.zxing.Result.*;


There are another changes to do:

in function encode M_java.height and M_java.width are invalid, instead use M_java.getHeight(), M_java.getWidth()


Special thanks for Ari Bejarano (the Java's Master) and to Andres Puerto for developing this solution.


这篇关于我在qr解码器Matlab代码中得到未定义的错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆