Annotator Posted January 24, 2014 Share Posted January 24, 2014 Hello Forum! I have a picture which looks like the source.jpg and I need the target.jpg picture. I do this at the moment with the software "Luminance HDR" with the "Projective Transformation": look at the function.jpg I would like to do this inside Paint.NET but I didn't found such a plugin here. My question: can somebody create such a plugin or is it dificult to modify an existing "similar" plugin? I maybe found also the code for this transformation at: http://searchcode.com/codesearch/view/20747084 Thanks for any suggestion,...... Annotator Quote Link to comment Share on other sites More sharing options...
Red ochre Posted January 24, 2014 Share Posted January 24, 2014 Hello Annotator,I'm not sure what you mean about the source.jpg and target .jpg - as both images are distortions already?The first one looks like a 'fisheye' distortion - you could try Effects/distortions/ 'bulge' - I think it's a built-in effect.The second appears to be a sinusoidal distortion - you could try seperate bulges?Or you could try my 'squirklewarp' plugin (link in sig), for more strange distortions!'LuminanceHDR' looks interesting - must investigate - thanks for the tip! Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
pdnnoob Posted January 24, 2014 Share Posted January 24, 2014 I think he's trying to take a 360 degree photo (the "fisheye") and change it to a panoramic image. I don't know of any plugins that currently do this. EDIT: as a side note, inside out and polar transformation had some interesting results... 1 Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
Red ochre Posted January 24, 2014 Share Posted January 24, 2014 Ah - that would make sense - I think?Presumably, best left to the specialist software designed for the camera that took the first 'fish-eye' image? Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
david.atwell Posted January 25, 2014 Share Posted January 25, 2014 So I am on an Android tablet and don't have a copy of PdN handy to try it on, but have you given the Polar2Rect plugin a try? EDIT: It's in illnab1024's pack. http://forums.getpaint.net/index.php?showtopic=8677 Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
pdnnoob Posted January 25, 2014 Share Posted January 25, 2014 I tried that already, david. It's basically the same result as polar transformation. Close, but no cookie. Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
TechnoRobbo Posted January 25, 2014 Share Posted January 25, 2014 My Fisheye uses projective transformation: http://forums.getpaint.net/index.php?/topic/26536-fish-eye-plugin/?p=392204 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...
pdnnoob Posted January 25, 2014 Share Posted January 25, 2014 This isn't a fish-eye effect, and he's looking for a way to go from the first image to the second. Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
TechnoRobbo Posted January 25, 2014 Share Posted January 25, 2014 oops , sorry -reverse projection 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...
pdnnoob Posted January 25, 2014 Share Posted January 25, 2014 A whole rep point says you can make a plugin for this Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted January 25, 2014 Share Posted January 25, 2014 You know he can, and probably will Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
TechnoRobbo Posted January 25, 2014 Share Posted January 25, 2014 I'll give it my best shot 1 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...
TechnoRobbo Posted January 27, 2014 Share Posted January 27, 2014 (edited) Annotator, After much head scratching and thought experiments I came up with this code: // Submenu: Distort // Name: Reverse Fish Eye // Title: Reverse Fish Eye - v1.0 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode #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; float offx =0; float offy =0; ColorBgra CurrentPixel; 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(offx,offy); dst[(int)x,(int)y]=CurrentPixel; } } } which takes this image: http://technorobbo.home.comcast.net/unfishtest.png and turns it into this image (I ran the plugin then resized the width): http://technorobbo.home.comcast.net/unfish2.png but it would not transform you samples correctly - I think your sample's fisheye is greater than 180°. the plugin is in PDN 4.0 ReverseFisheye.zip If I can get my son off his computer I can compile it in 3.5 It's in the "Distort" menu called "Reverse Fish Eye" Edited January 27, 2014 by TechnoRobbo 5 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...
Ego Eram Reputo Posted January 27, 2014 Share Posted January 27, 2014 You know he can, and probably will Told ya! +1. TechnoRobbo - are you going to release this in it's own thread? Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
pdnnoob Posted January 27, 2014 Share Posted January 27, 2014 Like I said, it's a 360 degree image Great plugin, though! +1 Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
Annotator Posted January 27, 2014 Author Share Posted January 27, 2014 (edited) Dear TechnoRobo! Dear Forum! Thank's for your help. Once again the description on other words: I get an image out of our render software (pCon.planner) which is a 360 dregree panorama image, look at source-360degreePanorama.jpg. But our panorama tour software krpano.com needs an image with another projection, look at target-afterTransformation.jpg. At the moment I do this transformation with the software Luminance HDR, but that's inconvenient. Then the krpano software makes out of this picture: look at demo.html which uses demo.swf @TechnoRobo: I need a 100% correct transformation, otherwise the virtual tour from krpano is to bad.... It should be for version 3.5 Maybe the correct transformation code for this is a part in: http://searchcode.com/codesearch/view/20747084 I found this, but I am not a programmer... I put all example files at: http://exch.bene.com/default.aspx?id=fa1724be-c1e8-4b22-b0c5-9b9887c9cfb4-example.zip Thank's again to all of you!...... Annotator. Edited January 27, 2014 by Annotator Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted January 27, 2014 Share Posted January 27, 2014 (edited) Ok, I get it your taken a virtual design planners rendered output (pCon) which is a spherical-type projection, used in a virtual tour for presentations, and trying to convert it into a panorama viewer's (kprano) format which is based on stitched photographs,also a virtual tour but used typically on a webpage. I thought a fish-eye lens was the source, that explains why it didn't conform. These are very specific applications more suited to a 3D app. like Blender I'll research the projections types an see if I come up with something. http://pcon-planner.com/en/gallery.html#c1464 http://krpano.com/examples/vtour/#top Edited January 27, 2014 by TechnoRobbo 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...
TechnoRobbo Posted January 27, 2014 Share Posted January 27, 2014 (edited) I have absolutely no experience with this software but according to this link http://help.pcon-planner.com/en/help/ you may be able to generate your image directly from pcon in the Media Maker section under "Presenting the Design" Also that fisheye looking image appears (in my opinion) to be a 360° "reflection map" used to create the the reflections on the render. Scroll to the bottom of this link and you'll see why I say that. http://www.pauldebevec.com/ReflectionMapping/ Edited January 27, 2014 by TechnoRobbo 1 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...
Annotator Posted January 27, 2014 Author Share Posted January 27, 2014 Dear TechnoRobbo! Yes, the pCon.planner creates this view at the end, but we export the renderjob before and make the rendering of the image on external computers (Renderslaves) and that's the point. These external renderslaves cannot convert the 360degree result at the end to the panorama view for krpano before saving the picture (like the pCon.planner). And we work with these renderslaves because these compters,work in the background for 2-48 (or more) hours for the image. Otherwise the PC would be blocked for hours and we cannot work...... I got the hint via Luminance HDR from the pCon guys, but as I mentiend it is a litte bit inconvenient. It would be great when we can do this only in one step and within paint.net. BR Annotator Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted January 27, 2014 Share Posted January 27, 2014 (edited) The source image in your first post is probably a reflection (enviroment) map and may not hold enough pixel data at the edges to give good looking results. Is there a different output from p.con that could possibly be used. Edited January 27, 2014 by TechnoRobbo 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...
Annotator Posted January 27, 2014 Author Share Posted January 27, 2014 In the first post was a reduced image, just for the visualisation of what I want. In my second post I have better examples: Link: http://exch.bene.com/default.aspx?id=fa1724be-c1e8-4b22-b0c5-9b9887c9cfb4-example.zip source-360degreePanorama.jpg is the picture which I get from my renderslave and target-afterTransformation.jpg is the image what Luminace HDR converts for krpano Are these better? Quote Link to comment Share on other sites More sharing options...
Annotator Posted January 27, 2014 Author Share Posted January 27, 2014 Here is another example of the image result from the renderslave Link: http://exch.bene.com/default.aspx?id=985848d5-a0e0-4f9e-9994-4e9c8968af3e-sample-before.png BR Annotator Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted January 27, 2014 Share Posted January 27, 2014 yes that's better - I'll have a shot at reversing a reflective map. 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...
TechnoRobbo Posted February 2, 2014 Share Posted February 2, 2014 (edited) I have done research and lot's and lot's code writing and have come to this conclusion. The 360° has been rendered incorrectly. If you create the 360° Fisheye Image with the table top in the center then you can use Illnab's Polar to Rect Plugin to create an image that Krpano will happily convert to a tour. (Plugin Settings:Angular Offset 0, Radial Scaling 100, then resize results to double the width.) You can get the plugin here Illnabs1024 Plugin Pack When you process the image it will look like this - https://www.dropbox.com/s/31zik8zhse27cwb/target-afterTransformation.jpg?raw=1 Notice the table's in the Center. If you can produce the fisheye with the table in the center then the image will appear normal with the table at the bottom. Second Solution: Krpano has a drag-n-drop tool (Convert SPHERE to CUBE droplet) that can convert the spherical image made by the PDN, into individual images that can be rotated and renamed (the key is l for left, r for right, b for back, f for front ,u for up d for down.). This requires a few steps but it should be quick Here's how: The results with PDN is actually a better and more accurate 3D!!!!! EER - +1. TechnoRobbo - are you going to release this in it's own thread? Gosh, I guess I can - I'll need to find some public domain fisheye images. I don't own a fisheye lens. Edited August 11, 2015 by TechnoRobbo 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...
Annotator Posted February 4, 2014 Author Share Posted February 4, 2014 Dear TechnoRobbo! Thanks, I will take a look next week, after my skiing vacation with my doughter,.... Greetings from Austria. 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.