Link to home
Start Free TrialLog in
Avatar of mhaynie
mhaynie

asked on

Georeference Image Code

I need to build a simple UI to georeference a jpg or gif image with a worldfile. Simple stuff if you are using ArcSomething or MapInfo. However, I can't seem to figure out how to do the affine transformation using more than 2 control points. Using a linear equation (top left coordinates and bottom right coordinates) seems easy enough, but what type of formula (and how) would I plug in more than 2 control points? I would hope the system could use control points that are not corners to make it easier on the user. The system is being developed in VB.net and yes, I realize applications like OziExplorer can do this and unfortunately, I need to reinvent the wheel. Any thoughts on how to get started on this?

Thanks in advance,
Michael
Avatar of Quash
Quash

As long as you build the grid up all you need is one point to work with.  Since you are inventing it, you just have to choose how you want to do it.  The deal is you have to know how you are going to reference things, I'd make a giant grid and use the lower left hand corner of the image as the reference, and snap it to the giant grid.  Another way of looking at it is you lay out a giant collage, and then put a grid on it, and label the grids.  

Quash, my ideas!
I have developed a solution to that problem. Although it also requires the points to be as distant as possible on the image , but it still can be used with nearer points.
You may check it at as an answer from me at

https://www.experts-exchange.com/questions/20870574/Georeferencing-satellite-imagery.html

I worked on another idea to Georeference Images (with as many points as available) but the results of it were not that much satisfying.
If you need it I can put it up here.
It comes down to a linear regression problem.

Xnew = a + bXold + cYold
Ynew = d + eXold + fYold

Fill in at least three know coordinate pairs and you can calculate the coefficients. Use more and you can calcuate the RMS which gices you an estimation of the accuracy.

Let me know if you need the exact formula's to calculate the coefficients.

Kris
ASKER CERTIFIED SOLUTION
Avatar of f_rodriguez
f_rodriguez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mhaynie

ASKER

Kris,
The formulas would be helpful for calculating the coefficients. If you have them please email or post them in this forum. My email is mhaynie(AT)caddistech(DOT)com. I've seen bits and pieces of the affine transformation, but can't seem to find how to solve for each part programatically. Thanks in advance, I really appreciate it.

Michael
I think f rodriguez answered your question.  Please award points to the experts that help you.  Who knows maybe he can help you figure out the programmimg.