Image Watch

Microsoft Free

Provides a watch window for visualizing in-memory images (bitmaps) when debugging native C++ code.

Microsoft
(24) Review
Visual Studio
2013, 2012
Download (19,594)
3/17/2014
1.5.1103.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (24)
Q and A (56)
Sign in to write a review
Sort by:

by Mudit Agrawal | 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!

by lin jingxian | April 06 2014

sounds good, but can not use with vs 2013 express ?

by V.N.V | 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.

by Daehoe Kim | January 28 2014

Excellent tool. I love it :)

by Chris Sienkiewicz | December 26 2013

Fantastic add in, makes working with images so much easier.

by Akhil Prem | November 19 2013

Very handy when working with images. I love it that I can use it with custom image types using NatVis.

by Trass3r | November 14 2013

This is a lifesaver!

by sarthakpati | October 01 2013

by Supe_Leva | September 26 2013

by Alessandro R Silva | September 07 2013

This is one of the reasons why i develop in Windows in openCV. A Extraordinary tool, with no match.

by Son D Tran | August 30 2013

by Brian Catlin | August 11 2013

This awesome tool makes developing OpenCV programs a breeze!

by stocastico | August 07 2013

Excellent tool, highly recommended

by Mahesh.Nalam | July 17 2013

This is Very useful tool

by Eric Stollnitz | July 08 2013

This is an excellent tool for viewing images while debugging. Saved me tons of time!

by The Great Fox | June 21 2013

It's an awesome tool for debugging.

You should add Zoom In/Out and Pan though - it would really help when debugging large Font texture-atlases. You want to be able to zoom in the 128x512 bitmap and see how it looks.

Great work! :)

by knauer0x | June 21 2013

Nice tool!

by Arkady Shapkin | June 18 2013

by primfaktor | June 18 2013

This makes debugging IPCV so much easier. Great tool!

by MikeRanzinger | June 14 2013

I have been needing a tool like this at work for forever! I also love the extensibility of it, so that you can make it work for your own types.

1 - 20 of 24 Items   
Sign in to start a discussion


  • Assertion Error
    3 Posts | Last post 10:31 AM
    • Hi.
      When I create the image with the size(1,65536), a problem of assertion error comes up in invalid image info. After I closed the this window, this problem did not come up. I think that image size is exceeded defined size.
      
      What's the maximum size used to image watch?
      If it wasn't for image size, what's the problem?
    • Hi Stacy, 
      
      thanks a lot for reporting this. Yes, the maximum size is 65535. The assertion window should not show, however. That's a bug. We'll have that fixed in the next release. We may increase the maximum image size, too :). 
      
      Thanks again!
      
      -Wolf
    • I would also profit from larger supported image sizes. I have matrices that are around sizes like 80000 x 120 and it would be a great help to be able to see them. At the moment I always have to insert "debug-code" that extracts smaller submatrices to be able to view them.
  • Debugging slow with 4k x 3k images?
    1 Posts | Last post Tue 4:30 PM
    • I've been using Image Watch since its release with images like 640 x 480, 1280 x 720 and similar, and never had any problems. More recently, I'm working with images that are 4320 x 3240 and similar, and the debugging is very slow. Stepping from one line to the next takes around 0.5 to 1 second, even if the image is not modified at all.
      
      Is something wrong with my system or is it a current limitation of Image Watch?
  • Showing [invalid]
    3 Posts | Last post Thu 6:32 PM
    • Hi, 
      First of all thanks a lot for this great tool. It makes our life much easier!
      I am trying to play with user-defined image type as part of project use user-defined image. 
      
      My image type is:
      struct IVC_DBIMG{
          int ncols;
          int nrows;
          int minx;
          int miny;
          int maxx;
          int maxy;
          double *data;
      } ;
      ----------------
      
      When I put the variable into Visual studio watch, I can see the channels=1, type=FLOAT64 and width, height and stride are the same as the variable I declared. 
      However, when I add the variable into ImageWatch, it shows it's invalid. [invalid] is shown on the snapshot and two [invalid]s are showing on the side. Here is the definition file:
      
        <Type Name="IVC_DBIMG">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
        </Type>
      
        <Type Name="IVC_DBIMG">
          <Expand>
            <Synthetic Name="[type]">
              <DisplayString>FLOAT64</DisplayString>
            </Synthetic>
            <Item Name="[channels]">1</Item>
            <Item Name="[width]">ncols</Item>
            <Item Name="[height]">nrows</Item>
            <Item Name="[data]">data</Item>
            <Item Name="[stride]">ncols</Item>
          </Expand>
        </Type>
      
      I am using VS2012. The ImageWatch.log file shows that the IVC_DBIMG type is detected and added. 
      
      Can anyone provide tips on what might go wrong here?
      
      Thanks a lot in advance. 
      
      Jason
      
    • The [stride] should be in bytes, so in your case 8*ncols
    • Matt,
      
      Thanks a lot. It works now!!! :)
      
      
  • Extension name was misleading
    2 Posts | Last post May 30, 2014
    • Reading the description of this extension I thought ... "oh, I sure missed something, I'll try".
      Now I know, I didn't miss something - in the description!
      
      But I miss something while using Image Watch! The support for build in types, like HBITMAP, HICON, HIMAGELIST.
      
      Why not supporting such handles to bitmaps in Image Watch?
      
      Best regards,
      
      Martin
    • Thanks for your feedback, Martin. 
      
      I agree it would be nice to be able to see HICONs etc in Image Watch. The reason why we haven't done this yet is that Image Watch needs to know the internal data structures behind those handles, but those are not public. Of course, working at Microsoft, we could get this information and put it in Image Watch. But this means Image Watch would now have to track which Windows version (existing and future) uses which internal data layout. This is not feasible given our limited resources for the project. Sorry. :/
      
      -Wolf
  • exception has been thrown by the target of an invocation
    2 Posts | Last post May 02, 2014
    • when i start the Image Watch an error throwed "exception has  been thrown by the target of an invocation". 
      I have uncheced Managed C++ Compatibility Mode.
      My vs version is 2013, i have updated with update 1 package .
    • Which process is throwing the exception, your app or Visual Studio?
  • Can I use vs2013?
    4 Posts | Last post April 30, 2014
    • Can I use vs2013? 
      I am using vs2013 to "[invalid]" has been output.
      Below is a sample code.
      
      struct My8BitRGBImage
      {
      	unsigned int ncols;
      	unsigned int nrows;
      	unsigned char* data;
      };
      
      
        <Type Name="My8BitRGBImage">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
        </Type>
       
        <Type Name="My8BitRGBImage">
          <Expand>
            <Synthetic Name="[type]">
              <DisplayString>UINT8</DisplayString>
            </Synthetic>
            <Synthetic Name="[channels]">
              <DisplayString>RGB</DisplayString>
            </Synthetic>
            <Item Name="[width]">ncols</Item>
            <Item Name="[height]">nrows</Item>
            <Item Name="[data]">data</Item>
            <Item Name="[stride]">ncols*3</Item>
          </Expand>
        </Type>  
    • and i am unchecked Use Managed Compatibility Mode in debug option
    • ye.. Solved
    • i have the same problem with you ,could you tell me how you sloved it.thank u . 
  • diagnostics
    5 Posts | Last post April 17, 2014
    • Is it possible to have error diagnostics? Either in the watch window itself or in the debug output together with the other natvis messages.
      It's really hard to tell why it doesn't display the image based on "[invalid]".
    • Hi Trass3r, thanks for the feedback. We've noticed that, too, and it's on our list. 
      
      In the meantime, I find it easiest to debug a natvis in two steps:
      
      First, disregard Image Watch and just look at the built-in Locals/Autos/Watch window. If you don't see your natvis items there ("[width]", for example), you have a bug in your natvis. That bug is unrelated to Image Watch and can be investigated using Visual Studio's built-in natvis diagnostics. 
      
      Then, once the natvis is working, it should be fairly straightforward to see why Image Watch shows "[invalid]".
      
      Hope that helps. Good luck! -Wolf
      
    • Everything is fine. And a manual '@mem(img.m_storage.m_data,FLOAT32,1,16,16,64)' works.
      
      <Item Name="[channels]">1</Item>
      <Item Name="[width]">m_storage.m_cols</Item>
      <Item Name="[height]">m_storage.m_rows</Item>
      <Item Name="[data]">m_storage.m_data</Item>
      <Item Name="[stride]">m_storage.m_cols * sizeof($T1)</Item>
      
      [type]	FLOAT32	
      [channels]	1	int
      [width]	16	unsigned __int64
      [height]	16	unsigned __int64
      [data]	0x000000000030d960	void *
      [stride]	64	unsigned __int64
      
      I also tried various casts cause I think a had a problem with the types before.
      But nothing happens.
    • Any ideas?
    • Hey Trass3r--sorry for the delay. Are debugging in mixed-mode? Also, would you mind providing a repro (C++ type definition + natvis)? Thanks!
  • Dump file formats
    2 Posts | Last post April 03, 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
    • 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
  • Function evaluation
    2 Posts | Last post March 25, 2014
    • First of all, thank you for this great tool. In particular, I appreciate the possibility to type in a function, which returns an image which is in turn displayed in the visualizer. I use it to display plots, histograms, etc during debug. I believe there is a great potential to make this feature even more powerful. Eg allow: Mat function1(function2(...)) calls. This would bring the debugging experience even closer to Python/Matlab-like scripting. 
    • Hi Zdenek, thanks very much for your feedback! 
      
      The feature you suggested would be very useful indeed. We have been thinking about similar functionality in the context of visualizing "1-d" images, i.e. those that have only one row or column (including non-image sequence containers like std::vector<char>, for example). I think the main difficulty there is making the logic for scaling axes and binning (for histograms) robust, so that it works well with all kinds of weird data distributions, NaNs, very long and short vectors, etc. But it's definitely on our to-do list.
      
      Best, -Wolf 
  • Can not see any images in Image Watch
    2 Posts | Last post March 05, 2014
    • Hi,
      I have created an MFC application using OpenCV. Currently is very basic,
      just load an image or a video and playback the video.
      In both cases though, I can not see any image appearing in the Image Watch.
      In the built in Locals view I can see the cv::Mat structure and all its members. 
      Any suggestions? 
      I am using Visual Studio 2012 update 4. 
      
    • Sorry, remove my comment. Stupidity is infinite. I just had to press the magnifying icon on the local view fro the image to appear in the image watch.  
1 - 10 of 56 Items