Qt Installation and Setup in Linux with OpenCV||Embedded Object Detection Project (Part 2)

这篇具有很好参考价值的文章主要介绍了Qt Installation and Setup in Linux with OpenCV||Embedded Object Detection Project (Part 2)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Qt Installation and Setup in Linux with OpenCV || Qt with OpenCV - Embedded Object Detection Project using Hikvision Industrial Camera (Part 2)

Readme

Hi! This is my second post on Qt development about how to set up Qt with opencv in Linux System, compared with the last blog talking about Windows environment. Thanks for ur support and don’t forget to click the “Follow” button to keep up with the project !! Enjoyyyyyyy!

Qt Installation and Setup in Linux with OpenCV

Installing and Configuring OpenCV

Download :

Qt Installation and Setup in Linux with OpenCV||Embedded Object Detection Project (Part 2),qt,opencv,linux
Choose the source code of the opencv 4.5.5 (recommend )

If you encounter difficulties accessing the official OpenCV website which may require VPN
you can visit the Mirrored Site

Install and Configure :

To install and configure OpenCV, you can follow the steps outlined in the Reference article.

Configuring Qt Project to Use OpenCV Library
INCLUDEPATH +=  /home/orin/opencv/opencv-4.5.5\
               /home/orin/opencv/opencv-4.5.5/include\
               /home/orin/opencv/opencv-4.5.5/include/opencv2

LIBS += /home/orin/opencv/build/lib/libopencv_highgui.so \
       /home/orin/opencv/build/lib/libopencv_highgui.so.405 \
       /home/orin/opencv/build/lib/libopencv_core.so    \
       /home/orin/opencv/build/lib/libopencv_imgproc.so \
       /home/orin/opencv/build/lib/libopencv_imgcodecs.so

Example code

Replace “path_to_image” with the actual path to your image file.
Windows path: D://document//image//44.jpg
Linux path: /home/orin/document/image/44.jpg

#include <QApplication>
#include <opencv2/opencv.hpp>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // Create OpenCV window
    cv::namedWindow("Image", cv::WINDOW_NORMAL);

    // Load image
    cv::Mat image = cv::imread("path_to_your_image.jpg");

    // Display the image
    cv::imshow("Image", image);

    // 等待键盘输入,以保持窗口打开
    cv::waitKey(0);

    return a.exec();
}

Problems still to be solved

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main() {

   cv::Mat image = cv::Mat::zeros(400, 400, CV_8UC3);

      // 创建一个矩形框
      cv::Rect boundingRect(100, 100, 200, 200);

      // 在图像上绘制矩形
      cv::rectangle(image, boundingRect, cv::Scalar(0, 255, 0), 109);

      // 显示图像
      cv::imshow("Rectangle Test", image);
      cv::waitKey(0);
}

Qt Installation and Setup in Linux with OpenCV||Embedded Object Detection Project (Part 2),qt,opencv,linux
In the image titled ‘Rectangle Test’ (shown in the link), it can be observed that there is no rectangle present. Despite my efforts, I have been unable to resolve this issue thus far. If you possess knowledge regarding the cause of the problem or have a potential solution, please reach out to me via private message. I would be grateful for your assistance, and I am looking forward to updating the blog post with your name credited for providing the solution.文章来源地址https://www.toymoban.com/news/detail-826653.html

到了这里,关于Qt Installation and Setup in Linux with OpenCV||Embedded Object Detection Project (Part 2)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • 【问题记录】Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-*

            在Linux中使用pip安装命令时出现报错:Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-*         安装了不适合当前Python版本的pip,例如Python3.5安装了带有f-字符串(Python3.5后才支持的一种新的增强型字符串格式化方式)代码的pip         方法一:更新

    2024年02月16日
    浏览(19)
  • Ref 系列 UniRef++: Segment Every Reference Object in Spatial and Temporal Spaces 论文阅读笔记

    Ref 系列 UniRef++: Segment Every Reference Object in Spatial and Temporal Spaces 论文阅读笔记

    写在前面   这周得加更两篇论文阅读笔记,完成 2023 的 flag。   此论文也是 Arxiv 比较新的文章,设计了一个大一统模型,解决图像和视频的指代分割问题,应该是篇大佬工作。 论文地址:UniRef++: Segment Every Reference Object in Spatial and Temporal Spaces 代码地址:https://github.com

    2024年02月03日
    浏览(9)
  • 解决Command “python setup.py egg_info“ failed with error code 1 in C:\Users\AppData\

    目录 解决Command \\\"python setup.py egg_info\\\" failed with error code 1 in C:UsersAppData 错误原因 解决方法 1. 确保安装了正确的依赖项 2. 更新pip和setuptools 3. 检查Python环境 4. 清理缓存 5. 手动安装依赖包 6. 检查错误信息 总结 在Python开发过程中,有时我们会遇到一些错误信息,其中之一是​

    2024年02月05日
    浏览(31)
  • 2023+HuggingGPT: Solving AI Tasks with ChatGPT and itsFriends in Hugging Face

    2023+HuggingGPT: Solving AI Tasks with ChatGPT and itsFriends in Hugging Face

    摘要: 语言是llm(例如ChatGPT)连接众多AI模型(例如hugs Face)的接口,用于解决复杂的AI任务。在这个概念中,llms作为一个控制器,管理和组织专家模型的合作。LLM首先根据用户请求规划任务列表,然后为每个任务分配专家模型。专家执行任务后,LLM收集结果并响应用户。 问题:

    2024年02月12日
    浏览(8)
  • HuggingGPT Solving AI Tasks with ChatGPT and its Friends in Hugging Face

    HuggingGPT Solving AI Tasks with ChatGPT and its Friends in Hugging Face

    HuggingGPT 让LLM发挥向路由器一样的作用,让LLM来选择调用那个专业的模型来执行任务。 HuggingGPT搭建LLM和专业AI模型的桥梁。 Language is a generic interface for LLMs to connect AI models Task Planning: 将复杂的任务分解。但是这里是将任务分解为一系列的structured tasks。还可以通过之前的 ch

    2024年02月15日
    浏览(14)
  • Multi-Modal 3D Object Detection in Long Range and Low-Resolution Conditions of Sensors

    Multi-Modal 3D Object Detection in Long Range and Low-Resolution Conditions of Sensors

    多模态长距离低分辨率传感器条件下的3D物体检测 慕尼黑工业大学计算机、信息与技术学院 - 信息学 随着自动驾驶车辆和智能交通系统的兴起,强大的3D物体检测变得至关重要。这些系统通常面临由于远距离和遮挡的物体,或低分辨率传感器导致的数据稀疏性的挑战,这可能

    2024年02月21日
    浏览(11)
  • 《2023 HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face》阅读笔记

    《2023 HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face》阅读笔记

    借助大语言模型(LLMS)在语言理解生成推理等方面表现出的出色能力,考虑将其作为控制器来管理现有的各种AI模型, 把语言作为通用接口 。基于这一理念,提出了HuggingGPT框架,利用LLMS(ChatGPT)来连接机器学习社区(Hug face)中的各种AI模型,具体来说就是在接收用户请求

    2024年02月02日
    浏览(15)
  • 【Threads and QObjects,Thread-Support in Qt Modules】线程和QObjects,Qt模块中的线程支持

    【Threads and QObjects,Thread-Support in Qt Modules】线程和QObjects,Qt模块中的线程支持

    Threads 继承了 QObjects类。它发出信号来指示线程已开始执行或已完成执行,并提供一些槽函数。 更有趣的是,QObjects可以在多个线程中使用,发出调用其他线程中槽的信号,并将事件发布到“live”在其他线程中的对象。这是可能的,因为每个线程都允许有自己的事件循环。

    2024年02月04日
    浏览(29)
  • opencv拉流出现missing picture in access unit with size 4错误解决

    opencv拉流出现missing picture in access unit with size 4错误解决

    我们使用opencv作为拉流客户端,获取画面后进行图像处理并推流(使用ffmpeg库)。 opencv解码同样使用ffmpeg库。 我们要求opencv能根据业务不断进行拉流操作,等效的逻辑代码如下: 注意代码中 // 无流时会有20-30s超时时间 注释的地方cap.open() 和 cap.read(frame),后面会用到。 在一

    2024年01月20日
    浏览(20)
  • Neo4j文档阅读笔记-Installation and Launch Guide

    Neo4j文档阅读笔记-Installation and Launch Guide

    ①找到下载好的Neo4j Desktop文件,然后双击进行安装; ②安装Neo4j Desktop根据下一步进行安装。 ①激活 打开Neo4j Desktop应用程序后,将激活码输入到“Activation Key”窗口中。 ②创建数据库 激活后,点击“New Graph”按钮,选择“Create a local graph”。然后输入“Database name”和“pa

    2024年02月14日
    浏览(9)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包