Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ImageWatch to realize the function of viewing pictures in Qt

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to use ImageWatch to view pictures in Qt". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. What is ImageWatch

Visual Studio has a plug-in specifically developed for OpenCV called ImageWatch, which allows you to view the pixel values of RGB when the image is enlarged.

Image Watch 2019-Visual Studio Marketplace

Image Watch Help

2. Get free to emulate this function with Qt:

Written purely in Qt, without the use of Halcon and OpenCV libraries.

(1) Open an 8-bit grayscale image

After the mouse wheel is enlarged, you can view the grayscale value; press down the middle mouse button to drag the picture

(2) Open the 24-bit color map.

After the mouse is enlarged, you can view the values of the three RGB channels; press the middle mouse button and drag the picture.

3. How to use Qt to open a large picture with hundreds of MB or even several GB?

It is recommended to use QImageReader in the official Qt documentation, and add the source code directly:

Bool MainWindow::readBigImage (const QString & path) {QImageReader reader (path); reader.setAutoTransform (true); if (! reader.canRead ()) {return false;} QSize originSize = reader.size (); / / original resolution qDebug () addCADBackgroundImage (image); / / one-time timer QTimer::singleShot (10, this, [=] () {slotViewZoomAuto ();}); return true } "Qt how to use ImageWatch to achieve picture viewing function" content is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report