Renesas Community
Renesas Community
  • User
    Join or sign in
  • Site
  • Search Community
  • User
  • Renesas Engineering Community
  • FAQ
  • HELP
  • More
  • Cancel
がじぇっとるねさすコミュニティ
がじぇっとるねさすコミュニティ
GR-LYCHEE Webコンパイラ Lychee mbed style OpenCV でエラー出ません?
  • Forums
  • Files
  • がじぇっとるねさす ゆーざー会 - Wiki
  • Tags
  • More
  • Cancel
  • New

 

 GR-SAKURA

 GR-KURUMI

 GR-COTTON

 GR-CITRUS

 GR-PEACH

 GR-KAEDE

 GR-ADZUKI

 GR-LYCHEE

 GR-ROSE

 GR-MANGO(*)

 SNShield

 Web Compiler

 IDE for GR

 TOPPERS関連

 女子美コラボ

 その他

 ※プロデューサミーティング中

 作り方使い方資料

 イベント関連

 作品記事

 体験記事

 その他

 

 ライブラリ

 ツール

 その他・過去ファイル

  • State Not Answered
  • Replies 2 replies
  • Subscribers 436 subscribers
  • Views 4856 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related Tags
  • 5Vトレラント
  • binファイル
  • BLE
  • DisplayApp
  • e2studio
  • error
  • ESP32
  • GR-LYCHEE
  • GR-PEACH
  • html
  • includeに関しては、C言語のヘッダファイルの意味合いを理解すれば、どういうことなのか?がわかるんじゃないか?と思いますよ。
  • OpenCV
  • pwm
  • WebCamera
  • webコンパイラ
  • カメラ
  • コンパイラー
  • シリアル
  • ダウンロード
  • ツールチェン
  • ファームウェア
  • 基板サイズ
  • 解凍
Related

Webコンパイラ Lychee mbed style OpenCV でエラー出ません?

ぎゃい
ぎゃい over 4 years ago

Webコンパイラと e2Studio のデフォルトプロジェクト

GR-LYCHEE_mbed_style_OpenCV_V1.0402  をインポートして
何も変更せずコンパイルすると コンパイルエラーがでます。

main.cpp の

create_jpeg()   と   get_jpeg_adr()  が見当たらない雰囲気です。
何か設定いじる必要ありましたでしょうか。

-------------------
main.cpp: In function 'void main_task()':
main.cpp:98:40: error: 'create_jpeg' was not declared in this scope
size_t jpeg_size = create_jpeg();
main.cpp:99:43: error: 'get_jpeg_adr' was not declared in this scope
display_app.SendJpeg(get_jpeg_adr(), jpeg_size);
make: *** [main.o] Error 1

  • Reply
  • Cancel
  • Cancel
  • Okamiya Yuuki
    0 Okamiya Yuuki over 4 years ago

    大変失礼しました。main.cppを差し替えさせていただきました。

    差し替えたmain.cppは以下の通りですので、コピーしてお試しいただければと思います。

    // GR-LYCHEE OpenCV Face Detection Example
    // Public Domain

    #include "mbed.h"
    #include "EasyAttach_CameraAndLCD.h"
    #include "SdUsbConnect.h"
    #include "opencv.hpp"
    #include "camera_if.hpp"
    #include "face_detector.hpp"
    #include "DisplayApp.h"

    using namespace cv;

    #define DBG_CAPTURE (0)
    #define DBG_PCMONITOR (1)
    #define FACE_DETECTOR_MODEL "/storage/lbpcascade_frontalface.xml"

    /* Application variables */
    Mat frame_gray; // Input frame (in grayscale)

    DigitalOut led1(LED1);
    DigitalOut led2(LED2);
    DigitalOut led3(LED3);
    DigitalOut led4(LED4);
    Timer detect_timer;

    static Thread mainTask(osPriorityNormal, (1024 * 33));
    static Thread displayTask(osPriorityAboveNormal, (1024 * 8));

    #if (DBG_PCMONITOR == 1)
    static void display_task(void) {
    DisplayApp display_app;
    int image_idx_display = 0;
    uint8_t * jpeg_addr;
    size_t jpeg_size;

    while (1) {
    jpeg_size = get_jpeg_buff(&image_idx_display, &jpeg_addr);
    display_app.SendJpeg(jpeg_addr, jpeg_size);
    free_jpeg_buff(jpeg_addr);
    }
    }
    #endif

    static void main_task(void) {
    #if (DBG_CAPTURE == 1)
    char file_name[32];
    int file_name_index_detected = 1;
    #endif

    printf("Camera Test\r\n");

    // Camera
    camera_start();
    led4 = 1;

    // SD & USB
    SdUsbConnect storage("storage");
    printf("Finding a storage...");
    // wait for the storage device to be connected
    storage.wait_connect();
    printf("done\n");
    led3 = 1;

    // Initialize the face detector
    printf("Initializing the face detector...");
    detectFaceInit(FACE_DETECTOR_MODEL);
    printf("done\n");
    led2 = 1;

    detect_timer.reset();
    detect_timer.start();

    #if (DBG_PCMONITOR == 1)
    displayTask.start(&display_task);
    #endif

    while (1) {
    // Retrieve a video frame (grayscale)
    create_gray(frame_gray);
    if (frame_gray.empty()) {
    printf("ERR: There is no input frame, retry to capture\n");
    continue;
    }

    // Detect a face in the frame
    Rect face_roi;
    detectFace(frame_gray, face_roi);

    if (face_roi.width > 0 && face_roi.height > 0) { // A face is detected
    led1 = 1;
    printf("Detected a face X:%d Y:%d W:%d H:%d\n",face_roi.x, face_roi.y, face_roi.width, face_roi.height);
    #if MBED_CONF_APP_LCD
    ClearSquare();
    DrawSquare(face_roi.x, face_roi.y, face_roi.width, face_roi.height, 0x0000f0f0);
    #endif
    detect_timer.reset();

    #if (DBG_CAPTURE == 1)
    sprintf(file_name, "/storage/detected_%d.bmp", file_name_index_detected++);
    imwrite(file_name, frame_gray);
    #endif
    } else {
    #if MBED_CONF_APP_LCD
    if (detect_timer.read_ms() >= 1000) {
    ClearSquare();
    }
    #endif
    led1 = 0;
    }

    }
    }

    int main(void) {
    mainTask.start(callback(main_task));
    mainTask.join();
    }
    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • ぎゃい
    0 ぎゃい over 4 years ago in reply to Okamiya Yuuki
    ありがとうございました。
    Webコンパイラ のコンパイルは通りました。

    因みにですが e2 studio の mbed style open cv のプロジェクトファイルも同じみたいです。main上記ソースコードに変えましたが
    e2 studio は エラーがのこります

    targets -> TARGET_RZ_A1XX -> device -> TOOLCHAIN_GCC_ARM
    RZA1LU.ld

    でエラーが出ています。
    お時間あるときに設定確認おねがいします。
    私の環境だけの問題なら申し訳ございません。
    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
サイト使用条件
プライバシーポリシー
お問い合わせ
© 2010-2023 Renesas Electronics Corporation. All rights reserved.