LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
DMC Engineering

Image Manipulation in Windows CE or Mobile using VS .NET

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

Recently DMC developed a high speed vision inspection system using LabVIEW. This system inspects many different parts and each part requires different inspection criteria, so we needed to develop a user interface (UI) that could be used to configure the current products, as well as be flexible enough to configure new products.


The manufacturing machine was already running on a Windows CE device, so our UI would need to interface with the UI already on the system and run on Windows CE. For a faster development time we decided to go with C# .NET for Windows CE. Unfortunately, the .NET library and functionality for Windows CE is far less capable than the standard .NET library.


The Windows CE library was sufficient for most of our needs, but there were two areas that proved fairly difficult. The first difficult item was obtaining and decoding the custom TCP messages that contained the images and inspection results from the LabVIEW Embedded Vision System that was running the vision inspection. However, after spending some time encoding and decoding the images, the UI was able to access full-sized images from the inspection system.
The next difficulty was that once these images were on the UI we needed to be able to zoom, pan, and draw inspection areas on the image. In a full .NET library this would have been really simple, but for a Windows CE device it required some custom work. The first step was to create a custom control and place just a picture box inside. Additionally, I set the SizeMode to StretchImage. By having the image take up whatever size the picture box was, I was able to zoom by increasing/decreasing the size of the picture box. Additionally, I was able to pan by moving the picture box relative to the custom control.


I have included all of the back-end code that I used to make the image behave as I wanted. The code I had was significantly more complicated, as I needed to be able to draw and pan rectangles that were used for inspection zones. I tried to remove all of that code to make the items I am explaining more clear; however, if anything seems odd, it is likely a remaining piece of the old code. If anyone is interested in the rectangle drawing code I would be happy to provide more information. Here is a link to the simplified code:

http://www.dmcinfo.com/Blog/articleType/ArticleView/articleId/664/Image-Manipulation-in-Windows-CE-o...

 

1 Comment
Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

DNatt, NI