Skip to content

#KL26-140 二次元コードの検出精度向上#39

Open
okuyama0528 wants to merge 1 commit into
mainfrom
ticket-KL26-140
Open

#KL26-140 二次元コードの検出精度向上#39
okuyama0528 wants to merge 1 commit into
mainfrom
ticket-KL26-140

Conversation

@okuyama0528

@okuyama0528 okuyama0528 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

チェックリスト

  • clang-format している
  • コーディング規約に準じている
  • チケットの完了条件を満たしている

変更点

QrCodeDetectorクラス(二次元コード検出器もZxingするように変更)

動作テスト

実験方法

実験結果

https://app.notion.com/p/uom-katlab/3a6dd5b1cc18807f9502c1dca2858b39?source=copy_link

添付資料

@okuyama0528 okuyama0528 changed the title update:二次元コード検出器もZxingように変更 KL140 二次元コードの検出精度向上 Jul 23, 2026
@okuyama0528 okuyama0528 changed the title KL140 二次元コードの検出精度向上 #26-KL140 二次元コードの検出精度向上 Jul 23, 2026
@okuyama0528 okuyama0528 changed the title #26-KL140 二次元コードの検出精度向上 #KL26-140 二次元コードの検出精度向上 Jul 23, 2026

@HaruArima08 HaruArima08 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

日報見ました。
結構精度上がってて、いいと思います。
特に指摘はないけど、一点だけ検出したQRの4頂点の座標も格納するように処理を追加して欲しいです🙇

@@ -9,12 +9,11 @@

#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>

@HaruArima08 HaruArima08 Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これも透視変換系の処理が不要であれば、必要ないかな。(11行目)

Comment on lines +11 to +12
options.setFormats(ZXing::BarcodeFormat::QRCode);
options.setTryHarder(true);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント欲しい。


// 透視変換で正面化
cv::Mat rectifiedFrame = rectify(frame, corners);
// 入力画像からZXing用のImageViewを生成

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 入力画像からZXing用のImageViewを生成
// 処理対象のフレームからZXing用のImageViewを生成

// 正面化したフレームをデコード
ZXing::ImageView iv(rectifiedFrame.data, rectifiedFrame.cols, rectifiedFrame.rows,
ZXing::ImageFormat::BGR, static_cast<int>(rectifiedFrame.step));
// 入力画像からQRコードを検出し、デコード結果を取得

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 入力画像からQRコードを検出し、デコード結果を取得
// 処理対象のフレームからQRコードを検出し、デコード結果を取得

}
// QRコードが検出できなかった場合は終了
if(!qrCode.isValid()) {
Logger::error("ZXing detect + decode failed");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Logger::error("ZXing detect + decode failed");
Logger::error("QrCodeDetector: QRコードの検出に失敗しました。");

int outputSize = static_cast<int>(outputQrSize + 2.f * quietZoneSize);
// 検出結果を保存
result.wasDetected = true;
result.content = qrCode.text();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

検出結果(QrCodeDetectionResult)は、検出したQRコードの4頂点の座標も格納するようなデータ構造になってると思う。現状、その4頂点の座標を使うかはわからないけど、検出したQRの中央のx座標に向かってカメラ走行するみたいな動作もできるかもしれないから、検出した4頂点の座標も格納したい。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants