Qubit Posted July 29, 2015 Share Posted July 29, 2015 This might be the hardest thing to explain but I will try my best. Actually ill just give an example in which I ask you to explain. Say i have a 2D image, a squad, and it is zoomed 100% in ... Say i zoom out to 50%. the square occupied pixels (0,0 to 50,50) and each pixel has a random color But if I zoom out how is this going to be displayed on the screen when you cannot have half a pixel.. There must be another way of representing what is to be displayed then I am thinking.. Helps please because this is hurting my head Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted July 29, 2015 Share Posted July 29, 2015 There are many different image scaling algorithms that exist. The goal is to remove pixels that have the least impact on the image in order to maintain the image quality. For example, if a very black pixel is directly touching many other pixels of a very similar color, that pixel will likely have a small cost when removed, so it may be a good candidate for removal. I seem to recall a pretty cool algorithm that I saw before which will find the shortest path through an image and then remove that path of pixels. This will basically remove a single path of pixels down the image which has a small cost, i.e. they will not be so noticeable when removed. If I remember what I am thinking of I will post the gif here. That is the general idea when scaling an image down. ^_^ 1 Quote Link to comment Share on other sites More sharing options...
Qubit Posted July 29, 2015 Author Share Posted July 29, 2015 (edited) There are many different image scaling algorithms that exist. The goal is to remove pixels that have the least impact on the image in order to maintain the image quality. For example, if a very black pixel is directly touching many other pixels of a very similar color, that pixel will likely have a small cost when removed, so it may be a good candidate for removal. I seem to recall a pretty cool algorithm that I saw before which will find the shortest path through an image and then remove that path of pixels. This will basically remove a single path of pixels down the image which has a small cost, i.e. they will not be so noticeable when removed. If I remember what I am thinking of I will post the gif here. That is the general idea when scaling an image down. So from what I understand.. In a video game for instance, every time you move forward or back, the computer uses a image scaling algorithm to render an object on your screen relative to your position? *I think I found something along the lines of the gif you were talking about. It's really cool, ecspecially being it doesnt make all the pixels "smaller" which one would think but just takes out a vertical or horizontal line of pixels! Edited July 29, 2015 by Qubit Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted July 29, 2015 Share Posted July 29, 2015 So from what I understand.. In a video game for instance, every time you move forward or back, the computer uses a image scaling algorithm to render an object on your screen relative to your position? I am not super experienced in 3d design or rendering, but I believe something similar to this happens. An object will have a model, this model will have a viewport/perspective based on where you are viewing it from. Based on this, rasterization will occur converting the image into pixles (a rastered image). All of this should be handled in the opengl pipeline or a similar 3d rendering process. And yes, that is the technique that I was thinking of. Here is an image similar to the one I was thinking of that demonstrates the technique running. As you see, the image starts larger, the red line represents the least cost path for that iteration (The pixels that are least noticeable) and then the pixels under the red line are removed. 2 Quote Link to comment Share on other sites More sharing options...