TechnoRobbo Posted February 2, 2014 Share Posted February 2, 2014 (edited) TechnoRobbo's Reverse Fisheye v1.0 Removes or reduces the fisheye distortion to produce a panoramic image. This plugin was developed while assisting another user. It got some reps and downloads so I decided to publish it. There were 2 algorithms I developed - Linear and Circular. Which one you use is up to you. Image Attributions: Jimee at en.wikipedia Cezary Piwowarski National Aeronautics and Space Administration The Codelab Source Code (for programmers) Hidden Content: // Submenu: Distort // Name: TR's ReverseFishEye // Title: TR's ReverseFishEye - v1.0 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode byte Amount1 = 0; // [1] Reverse Type|Linear|Circular #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); double CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; double CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top; double offx ,offy ,u, v; ColorBgra CurrentPixel; if (Amount1==1){ for (float y = rect.Top; y < rect.Bottom; y++) { for (float x = rect.Left; x < rect.Right; x++) { //find direction and distance u = (x - CenterX ) / CenterX ; v = (y - CenterY ) / CenterY ; double wide = Math.Sqrt(1 - v * v); wide = wide * u * CenterX ; offx =wide + CenterX; offy =y; CurrentPixel = src.GetBilinearSample((float)offx,(float)offy); dst[(int)x,(int)y]=CurrentPixel; } } }else{ for (float y = rect.Top; y < rect.Bottom; y++) { for (float x = rect.Left; x < rect.Right; x+=.5f) { //find direction and distance double maxradx = x-CenterX ; double maxrady = y-CenterY; double howfar = Math.Sqrt(maxradx * maxradx + maxrady * maxrady); double dirz = Math.Atan2(maxrady,maxradx); double mymax = maxradx * Math.Tan(dirz); double maxfar = Math.Sqrt(CenterX * CenterX + mymax * mymax); double normal = howfar/maxfar; offx = (float)(CenterX + Math.Cos(dirz) * CenterX * normal); offy = (float)(CenterY + Math.Sin(dirz) * CenterY * normal); CurrentPixel = src.GetBilinearSample((float)offx,(float)offy); dst[(int)x,(int)y]=CurrentPixel; } } } } The Plugin ReverseFisheye.zip PDN 3.5 version ReverseFisheye35.zip Edited December 27, 2015 by TechnoRobbo 2 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
barbieq25 Posted February 2, 2014 Share Posted February 2, 2014 Nifty plugin! Quote Knowledge is no burden to carry. April Jones, 2012 Gallery My DA Gallery Link to comment Share on other sites More sharing options...
skullbonz Posted February 3, 2014 Share Posted February 3, 2014 Very interesting,,,hhhmmm,,,,already have some ideas for some other uses,,let you know how I make out. Thanks TR Quote http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery Link to comment Share on other sites More sharing options...
charlieb000 Posted June 2, 2016 Share Posted June 2, 2016 How about solargraphy distortion? (Cylindrical pinhole camera)See here for some hints: https://www.flickr.com/photos/bob_81667/albums/72157620933251618/with/4315856823/CB. Quote Link to comment Share on other sites More sharing options...
Cakie67 Posted March 14, 2021 Share Posted March 14, 2021 (edited) NO ,THAT IS THE ONE i DO HAVE.. tHE ONE i need keeps it fiheye effect as .PING IMAGE ,AND then I change its shape to my desired effect. I have downloaded this fisheye but it will just not go into plugin effect. The other ones did the same and oddly finally made it into effects. I don't know why this fisheye is giving me so much trouble. It was in my plugins before. It is by far my favorite " fisheye " effect. But I will press on till I get it. Thanks Pixey. By the way Pixey, do you develop and create plugins too? Edited March 14, 2021 by Cakie67 Quote Link to comment Share on other sites More sharing options...
Pixey Posted March 14, 2021 Share Posted March 14, 2021 @Cakie67 If you have the Reversed Fisheye already, then it must be this one: Are you sure you are putting the .dlls into the Effects Folder that you made after you downloaded the Store Bought version of Paint.net? You know you had to make your own folder for them? " a folder in Documents called "paint.net App Files" then a set of sub-folders including one called Effects." 1 hour ago, Cakie67 said: By the way Pixey, do you develop and create plugins too? No, I'm not into that - too much script and lines for me to digest 🤪 Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
Cakie67 Posted March 15, 2021 Share Posted March 15, 2021 Yes dear. you are so sweet.., I did everything Red Ochre told me to do. today i was making a Desert art design . just to see if everything was working like I need. Gridwarp would shut down my Paint.Net I lost everything of my design and had to start over. Gridwarp I got installed, but it does not work. I was completely lost in making this design without " Distort Fisheye, and Gridwarp and Reshape .dll. here is the design, title " Desert Dreaming".. I was playing around with BoltBaits new " effect Dream. I do like that. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.