QRcode Decode : Weekly Report on Aug. 9th

QRcode Decode : Weekly Report on Aug. 9th

This week I have finished all mode of decode and started with the encoder.
And I have passed the testing bin of OPENCV_EXTRA.

1.FNC1 Mode

In this mode , we just need to recover QR-Code symbols and GS from encoded information.All data information should be remained the same and we don’t need to insert interpretation of application indicator in decoded string.

1.1 FNC1 in the first positon

bool QRDecode::fnc1_first is the symbol of FNC1 mode.And FNC1 mode is reflected in other mode decoding processes.

Here is the flowchat of how it works:
在这里插入图片描述

1.2 FNC1 in the second positon

bool QRDecode::fnc1_second is the symbol of FNC1 mode .
uint32_t QRDecode::fnc1_second_AI is the 8-bit codeword of Application Indicator.

Here is the flowchat of how it works:
在这里插入图片描述

            case QR_MODE_FNC1FIRST:
                fnc1_first = true;
                break;
            case QR_MODE_FNC1SECOND:
            /*get AI codeword*/
                fnc1_second_AI = get_bits(8,ptr);
                fnc1_second = true;
                break;

在这里插入图片描述

After scanning sevral QR-code , I find that DataToEncode actually does not contain “~2” as beginning indicator or as separator .

The encoded data is straightly :
37AA1234BBB1128200https://www.idautomation.com.

So I just add the indicator of ]Q3 and ]Q5 , and keep the data all the same.

my output : ]Q537AA1234BBB1128200https://www.idautomation.com

I wonder if it is ok for me to do that…

    if(fnc1_first){
        if(payload_len == 0)
            load_string(payload,payload_len,"]Q3");
        for (int i = 0; i < (int) fnc_buffer.length(); i++) {
            payload[payload_len++] = uint8_t(fnc_buffer[i]);
        }
    }
    else if(fnc1_second){//
        if(payload_len == 0)
            load_string(payload,payload_len,"]Q5");
        for (int i = 0; i < (int) fnc_buffer.length(); i++) {
            payload[payload_len++] = uint8_t(fnc_buffer[i]);
        }
    }

2. Structure Append Mode

In this mode , we just need to get the additional two codeword of Structure Append Mode.
The first codeword is symbol sequence indicator
The second one is parity data,which is identical in all append message to enable all readable symbols are part of the same Structured Append message

decode_error QRDecode::decode_structure(uint8_t * &ptr){
    if(bits_remaining(ptr)<16)
        return ERROR_DATA_UNDERFLOW;
    int sequence_indicator = get_bits(8,ptr);
    int parity_data = get_bits(8,ptr);
    return  SUCCESS;
}

3. Next task

Do I need to finish the Micro QR-code decoder first or the Standard QR-code encoder?
As the number of Locator Pattern is different , the original Detect code does not work for Micro QR-code. So should I focus on the encoder next or not?

Looking forward to hearing from you!
Qiushi 2020.0809

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值