From 11:00 PM CST Friday, May 9th - 3:00 PM CST Saturday, May 10th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CST Friday, May 9th - 3:00 PM CST Saturday, May 10th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Location: | National Instruments office |
Contact: | Dan Shangraw, P.E. |
Meeting Details: | Quarterly meetings, 11:00 a.m. – 1:00 p.m. |
User Group Website: |
This program will map a circular image to the surface of a cone. By folding the quarter circle image generated by the program into a cone shape and looking down on the point of the cone, the original image can be seen. This makes a great challenge to your friends - give them the distorted image and challenge them to figure it out. Tell them it is an IQ test that will make them think. This program only uses the standard picture control, so it doesn't require any special modules or toolkits to run. It works best with high resolution images. Low resolution images become a little blocky during resampling.
The program loads the image as a 2D array. The mapping loops through each coordinate in the destination image and finds the matching coordinate in the original image, then copies that pixel value. The end result is another 2D array which can be saved as an image. The distorted image is a quarter circle which must be printed, cut out, and folded to construct the cone.
Main Front Panel:
Main Block Diagram:
Hi! Isn't your code a bit "buggy"?
These seem to me a bit interesting results:
Peter
Changing Zoom out to 0 or a negative value results in No image displayed.
Shame on me. I didn't really push the code to the limits. I knew about the limitations, but simply avoided them. I set limits on the range of the Zoom, and checked to see if pixels are within limits during mapping. Both of these problems should be fixed in v2. I think the code should be a little more bug proof now.
Bruce