image watch iwatch怎么用用

后使用快捷导航没有帐号?
只需一步,快速开始
查看: 9136|回复: 5
在线时间279 小时经验值885 最后登录注册时间帖子阅读权限70UID1025076
学士, 积分 885, 距离下一级还需 215 积分
TA的每日心情无聊 14:21签到天数: 1 天[LV.1]初来乍到
G币171 最后登录注册时间
马上注册,结交更多机友,下载更多应用,让你轻松玩转手机。
已有帐号?   下载游戏和软件,请【】进入机锋市场!
如题。。。。。。。。。
在线时间0 小时经验值29 最后登录注册时间帖子阅读权限1UID
头像被屏蔽
该用户从未签到
G币0 最后登录注册时间
提示: 作者被禁止或删除 内容自动屏蔽
在线时间0 小时经验值223 最后登录注册时间帖子阅读权限50UID
大学专科, 积分 223, 距离下一级还需 177 积分
该用户从未签到
G币1 最后登录注册时间
如果对应电视,那你根据你的电视品牌,找找手机里有没有。有的话。就直接可以用。
机顶盒也一样。只要找到对应的品牌。就可以进行遥控。不过貌似有些按键是不灵的。
在线时间279 小时经验值885 最后登录注册时间帖子阅读权限70UID1025076
学士, 积分 885, 距离下一级还需 215 积分
TA的每日心情无聊 14:21签到天数: 1 天[LV.1]初来乍到
G币171 最后登录注册时间
白星海 发表于
如果对应电视,那你根据你的电视品牌,找找手机里有没有。有的话。就直接可以用。
机顶盒也一样。只要找到 ...
我点进去怎么让我选择的电视源
在线时间279 小时经验值885 最后登录注册时间帖子阅读权限70UID1025076
学士, 积分 885, 距离下一级还需 215 积分
TA的每日心情无聊 14:21签到天数: 1 天[LV.1]初来乍到
G币171 最后登录注册时间
无敌亨利 发表于
我点进去怎么让我选择的电视源
挽。。。。。。。。
在线时间0 小时经验值223 最后登录注册时间帖子阅读权限50UID
大学专科, 积分 223, 距离下一级还需 177 积分
该用户从未签到
G币1 最后登录注册时间
你找一下型号。或者你下载个遥控精灵就更多型号可选。
Powered by下次自动登录
现在的位置:
& 综合 & 正文
Image Watch 初体验
  Image Watch()是OpenCV的一款最新工具,它能够即时显示出矩阵的内容,即memory中Mat的信息,方便的调试,非常好用。不过目前该插件只支持VS2012,而且不能保存调试信息。本人对这个插件测试了一下,感觉不错,话不多说了,直接上图:
  上图中,src_3u是一幅3通道uchar类型的源图像,src_1u是其灰度化后的结果,blur_3u是源图像模糊后的结果,从右侧Image Watch的临时调试窗口可以清晰的看到这3张图片,选中某一张图片还可以放大查看细节。img_1ss, img_1d, img_1s, img_1f是四张单通道图片,它们的类型分别是short signed int, double, signed int, float, 它们的图像内容都是灰度渐变颜色,Image Watch也能够显示出这些图像。
  如下图所示,把鼠标放在所选图像的放大示意图上,可以显示出当前鼠标的坐标,鼠标所在像素的像素值,和当前放大倍数
  如下图所示,对于单通道图像,Image Watch还提供了彩色显示方式:
  不过这种显示方式对于3通道图像并不好用,下图的显示结果很奇怪,可能是按照某一通道的值来显示的
&&&&推荐文章:
【上篇】【下篇】Image Watch
Provides a watch window for visualizing in-memory images (bitmaps) when debugging native C++ code.
Visual Studio
1.5.1103.0
Reviews&(32)
Q and A (69)
Date - new to old
Date - old to new
Rating - high to low
Rating - low to high
Review (Maximum of 1200 Characters)
Fri 8:18 AM
A must if you program with OpenCV
January 28 2015
this is an amazing extension! works like a charm and saves a lot of hassle while debugging opencv code
January 08 2015
December 19 2014
Works like a charm, this add-in is a must for everyone working with OpenCV in Visual Studio.
December 16 2014
THE best and most amazing plugin ever! Makes coding so much more productive, and more fun as well.If you want one suggestion on what to improve, I'd say @mem(...). I don't needed it often, but when I'd need it, I most of the time can't get it to work. It's kind of documented, but I'm never sure: Do I put in the name of the variable? or '&variable'? or the address? or the address with 0x...? or...? and more often than not it's not working, and also not printing any error/debug information.I think what would be useful as well is a small button that opens a menu that shows all the operators you can use, and their syntax - like a small documentation inside.But those are just some tiny suggestions. It is incredible as it is!
November 09 2014
absolutely useful and great, but I want this add-on for both Xcode and eclipse (Mac and Linux) very bad please.
September 12 2014
This makes debugging image handling so much easier. I love it! Thank you! The ability to extend to my image types (QImage/QPixmap) is a game changer.
August 04 2014
Thanks for this great extension to Visual Studio,would like to see this open sourced to add even more features.
June 24 2014
This is indeed a game changer! Debugging in-memory images has always been so hard in VS. The simple power of Image-Watch visualization, combined with the efficient operators can turn hours of debugging to minutes or seconds.Great work!
April 06 2014
sounds good, but can not use with vs 2013 express ?
February 23 2014
Just a note to say a simple Thank You to the author.This extension is excellent.It provides a &quicklook& into a sequence of images from a loop.Without it, I'd be spending much more time on the problem. I'd need to save each image to disk, with a serialized name,and bring each up individually in an external viewer.
January 28 2014
Excellent tool. I love it :)
December 26 2013
Fantastic add in, makes working with images so much easier.
November 19 2013
Very handy when working with images. I love it that I can use it with custom image types using NatVis.
November 14 2013
This is a lifesaver!
October 01 2013
September 26 2013
September 07 2013
This is one of the reasons why i develop in Windows in openCV. A Extraordinary tool, with no match.
August 30 2013
August 11 2013
This awesome tool makes developing OpenCV programs a breeze!
« First
Working only with IplImage* and not with MAT
January 29, 2015
January 27, 2015
Hi,

First let me say that this add on, is totally stunning, and a must for every developer in the image processing field :)

Second I tried to install it with VS 2012, and interesting thing is that it is working, but only with variables like iplimage*, and not (funny...) with cv::Mat....
What should I tune in order to make it operational with openCv2?

( I tried all the native code tune in the debugger, tried #prgama unmanged, and tried to attach to process... all those thing didn't work.)

I still see in the debugger when pressing on the cv::Mat the :
rows, cols and not width height.)

Funny thing is that Native viewer work fine with those variables.

Any idea ? 

And thanks again for amazing tool.

January 28, 2015
Hi ODPR,

thanks very much for your feedback! 

It is curious that IPL images work fine and cv::Mat objects don't--I haven't seen that before. 

The fact that you see &cols& and not &width& means that Visual Studio doesn't pick up the natvis definition only for cv::Mat. 

One possibility is that the Native Viewer extension defines its own visualizer for cv::Mat which interferes with Image Watch. Have you tried uninstalling Native Viewer? If you try this, double check you have no cv::Mat related entries in your autoexp.dat file after uninstalling(https://msdn.micr/en-us/library/zf0e8s14.aspx)

Let me know if that helps.

Best,
-Wolf


January 29, 2015
Hi Wolf,
Thanks for the answer,
your idea seems logical, however, I can't find anywhere how to uninstall native viewer.
I tried to remove manually the line that native viewer install in the autoexp.dat, but still it works in the debugger ( so probably there is some other hidden places that it put files.).
Any idea how to uninstall Native Viewer?

Thanks
Op

Pixel strides
January 28, 2015
January 23, 2015
Dear Wolf,

the @band operator allows me to display individual channels of an image. I am not sure whether you do internally copy in that case, or whether you already have a pixel stride for this operator. If there were a pixel stride available, it would be very useful to be able to expose it publicly. Do you think that would be possible.

It would allow to display types resembling view's to image channels. It might also improve the support for some rare cv::Mat types since these already support strides for each dimension internally.

Thanks again for your great work,
Hauke

p.s. Is there any way to help contribute to Image Watch besides posting visualizers (as I did e.g. in March 2013 for ITK)? I mean contributing on the implementation side?
January 28, 2015
Hi Hauke,

thanks for your great suggestion. Yes, pixels strides would be useful.. Right now the @band operator assumes that the offset between two pixels within a channel is completely determined by the pixel format. This offset is used when copying/converting the selected band into an RGB image for display in the Visual Studio IDE.

Regarding contributions please PM me at [name of this extension]@live.com.

Best,
-Wolf
Proposal for 'slice' operator
January 23, 2015
January 23, 2015
Dear Wolf,

you already offer an @band operator. Since more and more people (esp. from the medical domain) are working with 3D images these days and I was wondering whether you could add an @slice operator.
Today, I can mimic the behavior by using @mem but that is a little bit cumbersome.

Regards, Hauke
December 21, 2014
December 16, 2014
Dear Wolf,

When can we expect Image Watch for Visual Studio 2015 (Preview)? :-) Looking forward to it, so I can start using the updated 2015 compiler and STL.

Thank you very much for Image Watch, and even more for making it available for free. It's THE most amazing tool ever. Ever! It makes coding in C++ surpass Matlab, and increases productivity (and fun) by an uncountable amount.

Cheers :)
December 19, 2014
Hi Elador, 

thanks so much for your feedback! The 2015 update should be out very soon :)

Best,
-Wolf
December 21, 2014
Hi Wolf,

Awesome to hear that a VS2015 update is coming very soon! It's the last bit missi-)

Thank you for your reply! Keep up the awesome work!

Cheers
VS 2013 update 2 compatibility
December 04, 2014
October 31, 2014
Hello,

extension does not install on VS 2013 update 2

full VS spec: http://pastebin.com/8hrmT39j

It did install for VS 2012 though - VS 2013 was simply not detected

November 01, 2014
Hmm .. have you tried installing any other extensions?
December 04, 2014
Hey,

a little necro, but I've just came back to this problem and found solution.
As I said ealier (quite unprecisely) downloading installer from website and running it with Microsoft Visual Studio Version Selector did't work.
Installing it via plugin manager in VS did work though.

@Wolf, yes, I've plenty of plugins installed, like UnityVS Tools or Nvidia's CUDA. Not sure if it matters anymore though :)

Have a nice day folks
Negative Strides
December 02, 2014
November 20, 2014
First of all: Thank you for this great Extension!

I noticed that i have problems displaying images with negative strides. Are they not supported or do i have to take some special steps for image watch to recognize negative strides?

Regards
November 24, 2014
Thanks a lot for your feedback! 

You are right, negative strides are not supported at this point. One possible workaround is to calculate the address of the first pixel row in the natvis file and then pretend the image has a positive stride. Note that you can do basic math in the natvis:

&Item Name=&[data]&&m_lastRowPtr - ((m_numRows-1) * m_stride)&/Item&

Your image will be displayed upside-down, of course, but that could still be valuable for many debugging scenarios. Also, if you do need to see the image in its correct orientation you can use the @flipv operator in Image Watch's watch list (see Image Watch documentation, &Image Operators&).

-Wolf
November 26, 2014
Hi Wolf,

thank you very much for your suggestions.

I got that working! 
However: I can have both positive and negative strides in one image type. I tried to check if my stride is && 0& or && 0& but i can?t find a statement that is valid in natvis syntax and i cant find a documentation. 
Do you know where the syntax and valid operators are described? 
I found a lot of Examples using equal and not equal but none using other comparisons.

Regards

November 26, 2014
I worked around this problem by using Bit shift operations: 

Check if number is negative: (ystride && (sizeof(int) * 8 - 1)) == -1

December 02, 2014
As Y-Strides are working fine i just hit the next problem. Some of the images i need to support also have X-Strides. Is there any plan to support these in futures versions?

Regards

Dump file formats
10 Posts |
December 01, 2014
April 02, 2014
Hi,

are there any rules associated with dumping to example a JPG or PNG file?
I created a natvis file for our image data, but I can only dump to a .BIN file.


Regards,

Joris
April 03, 2014
Hi Joris,

the current rule is that images with 1, 3, or 4 channels can be saved as .jpg or .png. We might remove that restriction in the future. As a workaround for now you can extract a single channel using the @band operator in the watch window. The result will be a single-channel image which can be saved as .jpg or .png.

That said, at some point we were considering an option that would allow you to save any image type in a simple (but potentially very inefficient) file format (like OpenCV's XML image format). That feature hasn't made it to the top of the list yet, but if that is something of interest, please let us know here in the forum.

Thanks!

-Wolf
November 17, 2014
Hi Wolf,

Our image data is in a single channel. The natvis file has the following statement:
&Item Name=&[channels]&&1&/Item&

But still no luck, i tried using the @band option as well. Has the BIN file a special format? If I know that is is sufficient for me, I can build it in our own viewer.

With kind regards,

Joris
November 17, 2014
Hi Joris, 

what are the other attributes of your image (size, pixel format)? 

The bin file has a special internal format that I cannot publish, unfortunately. 

-Wolf



November 18, 2014
Hi Wolf,

The data structure is as follows:

template &typename T&
class ImageBase
{
public:
	T *
P
	int
S
	int
W
	int
H
};

Natvis type:

&Type Name=&ImageBase&*&&&
&UIVisualizer ServiceId=&{A452AFEA-3DF6-46BB-F318025}& Id=&1& /&
&/Type&

&Type Name=&ImageBase&*&&&
&Expand&

&Synthetic Name=&[type]& Condition='strcmp(&short&, &$T1&) == 0'&

&DisplayString&INT16&/DisplayString&

&/Synthetic&

&Synthetic Name=&[type]& Condition='strcmp(&unsigned short&, &$T1&) == 0'&

&DisplayString&UINT16&/DisplayString&

&/Synthetic&

&Synthetic Name=&[type]& Condition='strcmp(&unsigned char&, &$T1&) == 0'&

&DisplayString&UINT8&/DisplayString&

&/Synthetic&

&Item Name=&[channels]&&1&/Item&

&Item Name=&[width]&&Width&/Item&

&Item Name=&[height]&&Height&/Item&

&Item Name=&[data]&&Pointer&/Item&

&Item Name=&[stride]&&Stride*sizeof($T1)&/Item&
&/Expand&
&/Type&

I'm using Visual Studio 2012 Update 4 with Image Watch 1.5.1103.0.

The image has a width, height and stride of 1024. Stride is in pixels.

With kind regards,

Joris

November 19, 2014
Hi Joris,

I just tested your code. I was able to dump images to a standard image file (png) as long as the pixel format was unsigned. The reason why it doesn't work for signed pixel formats (INT16) is that Image Watch doesn't have a default mapping from signed to unsigned pixel values (e.g. 0-255 in an 8bit png).

The @band operator does not change the pixel type. However, if your pixel values are all &= 0, you could use @scale(img, 1.0/32767), which will produce a FLOAT32 image (values between 0 and 1) that can be dumped to png. 

Does that help?

Best,
-Wolf
November 26, 2014
Hi Wolf,

The scale function does help but why not make a raw dump instead? Several tools provide a raw import with the option of how to interpret the raw data. Maybe that is a possibility?

With kind regards,

Joris

November 26, 2014
Hi Joris,

dumping to a raw format is definitely something we've been thinking about. The main reason that feature is not there now is that we didn't have the time to implement it yet. :/ 

-Wolf
November 27, 2014
Hi Wolf,

well, the holiday season is coming up. I have a wish and you )

With kind regards,

Joris
December 01, 2014
Watch out for the Visual Studio Debug (=VSD) pluging.
It does dumping of any sort of data to bin files for you.
It might not directly know about OpenCV image buffers but it can use any general type of symbol including buffer pointers and sizes as it's input.
Extention Crash IDE on huge matrices
November 07, 2014
November 07, 2014
Hi! Great extention, i use it regulary and it helps a lot.
Recently I had to deal with huge matrices (0). When such matrix is added to ImageWatch, the extention fails with assertion message.
I'm to not be able to see such big image, but crashing IDE is disturbing :)
November 07, 2014
Hi Eugene,

thanks for your feedback. Great to hear you find the tool useful! Sorry about the inconvenience with the assert on the huge image .. we apparently had an issue with our build system that would keep asserts in the code even in a release build :/ (see also &Assertion Error& posted on July 30, 2014). The upcoming update contains a fix for this.

Best,
-Wolf
Can not see any variables in Locals/Watch
November 03, 2014
October 27, 2014
Hi,

Thank you very much for this wonderful tool. I installed 1.5.1103.0 with visual studio professional 2012. I created a .natvis file for my own struct type and stored it in the \Visualizers\ directory. The ImageWatch.txtb says it detected and registered my type. When I debug in x64 mode and break at the point where I have the data, I don't see this variable in ImageWatch Locals/Watch window although I have added the variable manually to visual studio watch window. So no list is populated. Following is my code and .natvis file. Any idea why no list is populated?

struct MyDisplay{
FLOAT32* m_pB
INT32 m_iW
INT32 m_iH
INT32 m_iBytesPerLine;
};

//--------------------------------//
&?xml version=&1.0& encoding=&utf-8&?&
&AutoVisualizer xmlns=&http://schemas.microsoft.com/vstudio/debugger/natvis/2010&&

&UIVisualizer ServiceId=&{A452AFEA-3DF6-46BB-F318025}& Id=&1& MenuName=&Add to Image Watch&/&


&Type Name=&MyDisplay&&

&UIVisualizer ServiceId=&{A452AFEA-3DF6-46BB-F318025}& Id=&1& /&

&/Type&


&Type Name=&MyDisplay&&

&Expand&

&Synthetic Name=&[type]&&

&DisplayString&FLOAT32&/DisplayString&

&/Synthetic&

&Synthetic Name=&[channels]&&

&DisplayString&RGB&/DisplayString&

&/Synthetic&

&Item Name=&[width]&&m_iWidth&/Item&

&Item Name=&[height]&&m_iHeight&/Item&

&Item Name=&[data]&&m_pBuffer&/Item&

&Item Name=&[stride]&&m_iBytesPerLine&/Item&

&/Expand&

&/Type&
&/AutoVisualizer&

October 28, 2014
Hi SarSwa,

thanks for your feedback! Your natvis file looks good. A few questions: are the properties [type], [channels], etc. showing up in the built-in (VS, not Image Watch) Locals/Watch window? Does it work in x86? Are you debugging in mixed-mode by any chance?

-Wolf
October 29, 2014
Hi Wolf,

Thanks for the reply.
I dont quite understand the question, do you mean I see the &type& in VS watch window?
I know the data is of FLOAT32 kind and I can see the data in watch window. &type&, &channel& etc. are not variables right?
I choose x64 and then debug, I am sure I am not using mixed. Also for some reason my application would not run in x86 mode sorry could not do much.

Thanks

November 01, 2014
When you look at a variable of type MyDisplay in the normal VS watch window, you can &expand& the variable view so that you can see its members m_pBuffer, m_iWidth, etc. Now, if you have the natvis installed, this expanded view changes to [type], [width], ... This is what Image Watch reads, so unless you can't see [type] etc, when expanding the variable view in the VS watch window, natvis is not working. 

One common reason for natvis not working is debugging in managed or mixed (=native AND managed) mode. 

Does that help?
November 03, 2014
Ok so I don't see [type], [width] I only see the regular expanded view where I see all members and their values. I will check more on managed mode as I am not sure if I am in such a mode.

Thanks so far it is helpful.
Raw buffer visualization
October 23, 2014
October 22, 2014
Hi,

It would be very useful to be able to watch raw buffers at debug time. There are cases when you only have the buffer, without additional metadata and it would be very useful to be able to specify image size/format at debug time, as you do with raw pointers in the watch list.

Radu
October 23, 2014
This is possible with @mem(address, type, channels, width, height, stride): interpret raw memory as pixels ...

http://research./en-us/um/redmond/groups/ivm/imagewatchhelp/imagewatchhelp.htm#_Toc
« First}

我要回帖

更多关于 iwatch有什么用 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信