Bicubic Interpolation - Computerphile

Поділитися
Вставка
  • Опубліковано 22 лис 2016
  • Scaling images is usually smoother using bicubic interpolation. Dr Mike Pound explains why.
    More on bicubic: bit.ly/Computerphile_bicubic1
    Wikipedia bicubic article: bit.ly/computerphile_bicubic_wiki
    Resizing Images (Bilinear & Nearest Neighbour): • Resizing Images - Comp...
    Slow Loris Attack: • Slow Loris Attack - Co...
    Quantum Computing: • Quantum Computing 'Mag...
    Babbage's Analytical Engine: • Babbage's Analytical E...
    Sorting Secret: • Sorting Secret - Compu...
    / computerphile
    / computer_phile
    This video was filmed and edited by Sean Riley.
    Computer Science at the University of Nottingham: bit.ly/nottscomputer
    Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

КОМЕНТАРІ • 280

  • @whuzzzup
    @whuzzzup 7 років тому +170

    We need a video on the "CSI: Crime Scene Investigation" interpolation.

    • @ezadviper
      @ezadviper 7 років тому +27

      Enhance !

    • @Madsy9
      @Madsy9 7 років тому +19

      Pan! Uncrop!

    • @aajjeee
      @aajjeee 7 років тому +17

      look behind the camera

    • @frollard
      @frollard 7 років тому +25

      Can you get a face from that reflection in the coffee mug?

    • @dealloc
      @dealloc 7 років тому +6

      There is a project on GitHub (alexjc/neural-enhance), which uses neural network to 'enhance' images; it's based on the joke itself.

  • @chlendimounir2834
    @chlendimounir2834 7 років тому +502

    i like this dude

    • @displayoff
      @displayoff 7 років тому +48

      he's dank

    • @funkysagancat3295
      @funkysagancat3295 6 років тому +2

      I like the explanations etc. but I don't like his voice :/ I know that it is something completely personal and that is not going to chance soon, but I don't like it

    • @KingfisherTalkingPictures
      @KingfisherTalkingPictures 8 місяців тому +1

      Very educated Frodo Baggins

  • @DuncanEllis
    @DuncanEllis 7 років тому +165

    thanks for ex-splining that.

    • @robinw77
      @robinw77 7 років тому +42

      Duncan Ellis Come on, you can do bezier than that

    • @otakuribo
      @otakuribo 7 років тому +16

      Duncan Ellis I should've node better

    • @reblogo
      @reblogo 7 років тому +23

      You're really ahead of the curve on these puns.

    • @oresteszoupanos
      @oresteszoupanos 7 років тому +17

      You are all setting a bad ex-sample.

    • @nkag545
      @nkag545 3 місяці тому

      Mind if I join you, hermit-e-s?

  • @TheArcher92
    @TheArcher92 7 років тому +19

    I really dig this guy. He's got humour and a clear way of explaining stuff. more please! :)

  • @javierbg1995
    @javierbg1995 7 років тому +5

    Dr Mike Pound is probably the best communicator in the channel. Always happy to see a new video featuring him!

  • @vladqoq
    @vladqoq 7 років тому +3

    OMG, i just love the way how Dr Mike Pound sounds.
    Computerphile, please, make more videos with Dr.Mike Pound.
    HE IS AWESOME.

  • @TimeHarmonic
    @TimeHarmonic 7 років тому +59

    I really like the videos with Dr Mike Pound. They are the best

    • @lewisb8634
      @lewisb8634 7 років тому +1

      I agree.

    • @rouuuk
      @rouuuk 7 років тому +1

      i didnt know his name. but i agree

    • @synchronos1
      @synchronos1 7 років тому

      The name of the interviewee is always in the description text of the video.

    • @oresteszoupanos
      @oresteszoupanos 7 років тому

      He's... sound as a Pound! ^_^

    • @hellterminator
      @hellterminator 7 років тому +1

      I do like Dr. Pound, but professor Brailsford is better.

  • @KnownNever
    @KnownNever 7 років тому +35

    Nothing like a cup of Dr. Mike to start the morning off right... great vid as always!

  • @budkin
    @budkin 5 років тому

    I could watch Dr. Mike explain literally anything and find it engaging.

  • @NorbertHarrer
    @NorbertHarrer 7 років тому +81

    Ahh, I love it when Spiderman does computer science :-D

  • @yandodov
    @yandodov 7 років тому +37

    I like your videos with Mike. Make some more videos with Mike, please. Thanks!

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 6 років тому +1

    Yes, worth talking about Lanczos. Also worth talking about the general principle of image/signal reconstruction using the sinc function, because all resampling techniques are basically shortcuts to avoid the high computational expense of sinc.

  • @8eck
    @8eck Рік тому

    I'm impressed of how much this man knows. Every time i'm googling some complex stuff explanation, i see his tutorials in the results. :D

  • @ScienceSeance
    @ScienceSeance 7 років тому +3

    What a great teacher. Pint deserved for this dude.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 4 роки тому +11

    7:17 If you operate in high-dynamic range formats like EXR, which has floating-point pixel components, you have room to both overshoot and undershoot. Then you can renormalize the image using a filmic response curve or something without clipping.

    • @notnullnotvoid
      @notnullnotvoid 5 місяців тому

      Even then you can have overshoot past black into *negative* brightness values, which is still a problem.

  • @Soundole
    @Soundole 7 років тому

    After watching this video, I now have an explanation for some of the artifacts that appear when I'm resizing pixel-art. Thanks for helping me to better understand the world

  • @SazLowify
    @SazLowify 7 років тому +1

    Thanks for this video, it explained a lot of problems I had with interpolation in the past.

  • @logicalfundy
    @logicalfundy 7 років тому +7

    "auto" most likely changes the resizing algorithm being used when sizing up vs sizing down, or when resizing is minimal (1.1 times) vs when it is a large change (5 times or so).

  • @britishcuisineasmr4045
    @britishcuisineasmr4045 3 роки тому +1

    What is also interesting with respect to this technique is that CNN-based superresolution models perfrom *significantly* better if the training input has been downscaled using bicubic interpolation rather than cruder methods.

  • @unekdoud
    @unekdoud 7 років тому

    Please make a playlist for Dr Mike Pound's Computerphile videos, they're great.

  • @jiaming5269
    @jiaming5269 7 років тому +14

    Very well explained, quite enjoyed it!!!

  • @TheMasonX23
    @TheMasonX23 7 років тому +1

    I use Hermite interpolation (x * x * (3 - 2x)) in my games all the time. It eases in and out evenly near 0 and 1 cheaply, and makes blending look so much better in most circumstances

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 4 роки тому +2

    2:15 Originally, a “spline” was an actual rod made of some flexible material, that a draughtsperson would use to draw curves on paper with a pencil. Then the term was carried over to mathematical operations for doing the same sort of thing.

  • @WIImotionmasher
    @WIImotionmasher 7 років тому +1

    I'd like to say, that relatively new effect in these videos, where the piece of paper is distorted to look like a top down view, is cool.

  • @userou-ig1ze
    @userou-ig1ze 7 років тому

    keep up the awesome work. this channel and vids are a gem!

  • @TheHardSteppa
    @TheHardSteppa 2 роки тому

    Thank you for this. Now some of the other articles ive read actually make sense!

  • @0x8080
    @0x8080 7 років тому

    Today at work (I'm a software engineer), a co-worker was talking to another one of my co-workers about animating an element within the software we are working on. I know that some forms of animation use linear interpolation, so I got on Wikipedia and read a little bit about it to brush up on the subject (I usually study things that just come to mind :P). Anyways, as I was studying, I noticed Bi-Cubic Interpolation, something I had never heard of, as I haven't taken a high enough math class to really get into that. It was so damn strange to just get on UA-cam and see that you made a video about something that discreet. Freaks me out hahahaha.

  • @tycoinreno
    @tycoinreno 7 років тому +5

    one example where interpolation (of any kind) is terrible is resizing barcodes. Those should be resized using nearest-neighbor (sometimes called "none" when selecting interpolation method).

  • @alanturingtesla
    @alanturingtesla 5 років тому

    Such an awesome video. Exactly enough theory, exactly enough drawing and exactly enough maths :D

  • @OneAndOnlyMe
    @OneAndOnlyMe 2 роки тому

    In Photoshop you can explicitly tell it which algorithm to apply when resizing up or down, so in auto mode the code would use the resizing up/down to determine which algorithms is best for scaling an image up/down.

  • @kelvin.salton
    @kelvin.salton 7 років тому

    The best explanation I've ever seen.

  • @neoqueto
    @neoqueto 7 років тому +91

    Do a video on the Lanczos filter

    • @Samboy_Chips
      @Samboy_Chips 7 років тому +2

      Yes! More on video/picture scaling algorithms!

    • @styleisaweapon
      @styleisaweapon 7 років тому +1

      you would think that lazy people would only want to downscale

    • @bytefu
      @bytefu 7 років тому

      swifterik
      Not exactly, but I'm too lazy to explain anything to you.

    • @EconaelGaming
      @EconaelGaming 7 років тому +2

      Then we'll finally know how to pronounce it :D

    • @Sjobban112a
      @Sjobban112a 7 років тому +2

      +swifterik, I google stuff like that all the time! :D

  • @skeetabomb
    @skeetabomb 7 місяців тому

    Computerphile are single-handedly keeping the tractor-feed dot-matrix printer paper manufacturers in business :P

  • @gameoverwehaveeverypixelco1258
    @gameoverwehaveeverypixelco1258 7 років тому

    I used to use an old paint program, I found that the option to resample image instead of resizing gave a smoother less jagged edge image, looked smooth as silk. less newspaper dot effect or wavy lines in images made up of visible dots or grain like scans of old photos.

  • @LianParma
    @LianParma 7 років тому +20

    Scaling pixel art and imagens based on 8-bit aesthetics are good examples of situations where nearest neighbor works better than bilinear or bicubic interpolation. The final image should keep the hard edges.

    • @G4mm4G0bl1n
      @G4mm4G0bl1n 7 років тому +3

      I can see all your pictures covered in Moiré.

  • @SomethingUnreal
    @SomethingUnreal 7 років тому +53

    Eventually, this series of interpolation videos will come a full circle back to convolutional neural networks when it reaches the Waifu2x upscaling software.

  • @AJ-et3vf
    @AJ-et3vf 2 роки тому

    Very nicely well-explained. Thank you!

  • @DimaDesu
    @DimaDesu 6 років тому

    Great explanation. Super clear! Cheers!

  • @SeezSantos
    @SeezSantos 5 років тому +1

    No wonder AE to PR upscaling can take so long when taking a clip from 1080 to 4K. Thank you sir !

    • @Schattengewaechs99
      @Schattengewaechs99 5 років тому

      Every single frame has to be converted into a wave and the quantized to get a pixel image again.

  • @MrSkizzzy
    @MrSkizzzy 7 років тому

    Awesome Video on Image processing, hope we See more in the Future :)

  • @10100rsn
    @10100rsn 7 років тому

    For images, I've found that xBRZ scaling looks better and preserves the edges making the result sharper. This is better when you want to scale an image up for print or if you want to vectorize it after scaling. Or if you just wish to increase the resolution without blurring the edges.

  • @starkgate
    @starkgate 7 років тому +1

    Very interesting video, thanks ! Can we get a video on other scaling algorithms ? (eg the ones that rely on fractals)

  • @Nautilus1972
    @Nautilus1972 4 роки тому

    I didn't think I'd be happy to come across a bicubic interpolation video today, but here we are.

  • @djdeluxe76
    @djdeluxe76 7 років тому

    Explained very well. Thanks!

  • @tomkriek
    @tomkriek 7 років тому +5

    Mike Pound videos, instant like

  • @contingenceBoston
    @contingenceBoston 7 років тому +1

    7:42 I've noticed that some optimized images look as though they've been filtered with an unsharp mask (or something of the sort) on the scale of a pixel or two. Could this unintentional contrast be a paradoxical byproduct of the "overshooting" and "undershooting" which can occur with bicubic interpolation?

  • @DarkAngelEU
    @DarkAngelEU 5 років тому +1

    These videos have made digital photography so much more interesting than my five years at the Art Academy, which basically made me turn into a film snob lol

  • @ButzPunk
    @ButzPunk 7 років тому +4

    Can you do a video about reticulating splines?

  • @gizmoguyar
    @gizmoguyar 2 роки тому +2

    Photoshop has "Bicubic sharper" and "Bicubic smoother" I don't know what the difference is, but I do know that the "auto" setting uses smoother when upsampling, and sharper when downsampling. In both cases it uses some sort of bicubic algorithm. It also has a plain "Bicubic" setting. Adobe says this is the "most precise", but the slowest.

  • @10vid5
    @10vid5 4 роки тому

    The overshoot of the cubic interpolation is mostly due to the fact that the derivative at a point is taken as the arithmetic mean of the two slopes that unite with the neighboring points:
    derivative_at_point = ( prev_slope + next_slope ) / 2
    This overshoot can be mitigated by averaging the *angles* of those slopes instead of the slopes themselves:
    derivative_at_point = TAN ( ( ATAN (prev_slope) + ATAN (next_slope) ) / 2 )

  • @TechyBen
    @TechyBen 7 років тому

    WOW. I need to know this equation. You just told me it...... THANK YOU!

  • @airraidsiren
    @airraidsiren 7 років тому +1

    So, I know this is not Numberphile, but there are distinctly different things called "cubic interpolation", and I think it's worth mentioning because in this video Mike is talking generally about cubic spline interpolation where you have a different polynomial between each pair of points. Normally this is done in image editing programs with Hermite splines that join end to end to make a C1 continuously differentiable function. But you can also make piecewise cubic functions that are not continuously differentiable (non-osculatory), which is what is shown on the first page linked to in the description. This is not normally done on images, and I personally wouldn't recommend anyone implementing this in 2D for photos. Cubic Hermite spline interpolation is also flexible, and you can adjust for more smoothness or more overshoot. I mention this because it was asked below what the difference is between Photoshop's bicubic (smoother) and bicubic (sharper), and the answer is the tension parameter of the splines which determines how sharp or gradual your slope approximations are at the sample (control) points.

  • @AlexanderKrivacsSchrder
    @AlexanderKrivacsSchrder 7 років тому +18

    In addition to the ones dealt with so far, GIMP has a resize mode called "Sinc(Lanczos3)." Any plans for explaining that one?

    •  2 роки тому +3

      It's a signal-processing type approach. One way of thinking about it, might be like this: whereas cubic interpolation fits a third-degree polynomial curve by using the 4 nearest pixels, Lanczos interpolation is more like fitting a Fourier series to a much larger area (ideally infinite, but in practice not). That's not what actually happens (it's actually using a "Lanczos kernel", which has an effect similar to attaching a Sinc-windowed Sinc wavelet (yes, two sincs) to each source pixel, and then summing up all the wavelets at each destination point), but at least to me it's simpler to think of it that way. So it's even smoother than bicubic, but may very well cause overshoot and sharp-edge artifacts worse than bicubic.

    • @AlexanderKrivacsSchrder
      @AlexanderKrivacsSchrder 2 роки тому

      @ I appreciate you taking the time to explain this to me. Unfortunately, a lot of those words carry no meaning for me with my current knowledge, and so I'd presumably have to do a lot of additional reading in order to fully understand your explanation. When asking about an explanation for the mode, I was hoping for more of a visual explanation in the style of these videos since I find those a lot easier to, if not necessarily *understand* what's going on, at least quickly get a sense of what's going on.

    •  2 роки тому +3

      @@AlexanderKrivacsSchrder Yeah, I was trying to say a couple of things: 1) A video explaining the mathematics behind Lanczos interpolation in a simple way does not seem very likely to me, and 2) if you don't care about the mathematics, and don't care about the mathematical difference between a polynomial curve and a Fourier curve, then you probably don't even need such a video. It works just like a bicubic curve, it just uses many more points at a time, and tries to fit a smooth curve over them using a more complicated formula based on sums of sine curves. Beyond that, you can think of them as pretty much the same. As mentioned, both methods even handle sharp edges somewhat poorly. But if you are interested in some mathematics, like the sums-of-sine-curve aspect, then maybe check out a video or two on wavelets. Alternatively, there's a Mike Pound video on JPEG DCT. You can watch it, then imagine that to scale something, the source image is first converted with such a DCT (Discrete Cosine Transform). Sine/cosine curves are smooth, after all. Then, once you have the DCT matrix, you now consider the cosine curves to be continuous, so that they can be sampled at the in-between points when you create the scaled image. That should give a reasonable idea of the principle, I think.

  • @Czeckie
    @Czeckie 7 років тому

    he's a really great educator

  • @Ziggletooth
    @Ziggletooth 7 років тому +1

    I need some help. Whats the best way to scale down a raster image? I have some images I want to send to print but I'm concerned it may be too pixelated. Is there a better, sharper way than just using the standard scale function in gimp?

  • @cubicinfinity2
    @cubicinfinity2 3 роки тому +1

    Does it make a difference what order you interpolate in: Horizontal then vertical, rather than vertical then horizontal?

  • @ppVon
    @ppVon 7 років тому

    Is it possible to create a program that mixes the methods on a case to case basis? I think that would be interesting to see.

  • @georgikostov6982
    @georgikostov6982 5 років тому

    Site on bicubic is great ! Tnx :)

  • @RABWA333
    @RABWA333 7 років тому

    thanks, was very helpful , I have data in form of (time stamp), these that collected by RFID sensors carried by persons walking through the town , now , i want to connect the routes which the people take using the time stamp i have . but i found some missed reading (some RFID tags did not work). How i can complete these missed reading ? which method or algorithm should i use? any suggestion

  • @willhdq
    @willhdq 9 місяців тому

    Can you tell me what is Cardinal Interpolation please? Would it be possible to make a video on it?

  • @RealMcDudu
    @RealMcDudu 5 років тому

    thanks.
    Quick question - why do you use these old 80s printers pages as drafts ?

  • @user-xn4lw5ux2i
    @user-xn4lw5ux2i 7 років тому +20

    What about sinc- and Lanczos-Interpolation? As far as I know, the latter is used to reduce the ringing artefacts.

    • @postvideo97
      @postvideo97 7 років тому +4

      maybe also talk about xBR, HQ and Sparse Coding methods for upscaling too?

    • @drunkensailor775
      @drunkensailor775 7 років тому +2

      also neural network real time scalers, NNDI3 and other very interesting things about video rendering of today

    • @postvideo97
      @postvideo97 7 років тому

      oh boy I could talk about ANNets all day.

    • @airraidsiren
      @airraidsiren 7 років тому +2

      When people talk of sinc interpolation w.r.t. images, they usually mean a Lanczos type windowed sinc interpolation. It is very smooth, which works well for some images, but the tradeoffs are the much large kernel size (thus slower computation) and also the fact that optimally smooth is not always perceptually the best result. A bit of overshoot gives increased acutance, which can make the image look "sharper" or crisper. This is often desirable, especially when downsizing. Also, FWIW, you can do bicubic Hermite spline interpolation without ringing, or with lots of ringing, to taste, depending on how you calculate your slopes. It's fully adjustable via the "tension" parameter of cardinal splines.

    • @George70220
      @George70220 Рік тому

      ​@@airraidsiren how did you learn all this? I'd love to dive

  • @primostyles
    @primostyles 7 років тому +171

    Knows a lot for a guy with only 10 books lol

    • @LoisoPondohva
      @LoisoPondohva 7 років тому +20

      Plasmaboo or these are only books he didn't have time to read yet.

    • @MrCOPYPASTE
      @MrCOPYPASTE 4 роки тому +7

      I think he uses bicubic interpolation of those books contents, then uses some permutation, combinatory and use case statistics to refine his response further down .

    • @RolandoP
      @RolandoP 4 роки тому +5

      Those are the books that he is reading that day.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 4 роки тому +1

      I have that C++ book. Not as useful as the actual language reference.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 4 роки тому

      “WPF In C# 2010” ... I sincerely hope that is not being used much any more ...

  • @salmamoora6048
    @salmamoora6048 3 роки тому

    Hi sir, I want to ask you about bicubic convolution interpolation in image to addopt on pixel estimation on wide missing pixels. Is it possible to use 8x8 neighbour pixels to perform bicubic convolution interpolation? How about the kernel and the interpolation formula?

  • @5ilver42
    @5ilver42 7 років тому

    now this needs to be appended with explaining bicubic smooth and bicubic sharp

  • @j7ndominica051
    @j7ndominica051 7 років тому

    Trusting the "auto" preset isn't always the best thing. Some versions of photoshop made a "sharper" version of bicubic the default, which gave horible ringing halos. They have probably improved the defaults, but in that version (I believe it was 8.0) the sharper had absolutely no application. If you were to clip the range then you wouldn't actually observe the overshoots, and have no problem. They do show up often on screenshots or textual captions or dark trees against light sky.

  • @JmanNo42
    @JmanNo42 7 років тому

    This probably a very stupid question but does this make any sense used in a linear stream like music? Sampledata is interpolated in the DAC, ADC?

  • @ericsbuds
    @ericsbuds 7 років тому

    LIKED! ok time to watch the video now :D

  • @runhigh123
    @runhigh123 4 роки тому

    Is it possible to use BiCubic as default, and use BiLinear only at those sharp step changes??

  • @WWayneB
    @WWayneB 7 років тому +1

    Is there a technique to tell how inaccurate the algorithms are and compare them? For example with bilinear and bicubic magnify by 2.3 and then shrink with the algorithm again to get the same original image size. Are there standard ways to give a value showing which one on the "round trips" is closer to the original and by how much with a quantitative analysis?

    • @airraidsiren
      @airraidsiren 7 років тому +2

      Yes. Do the process you describe, and then diff the result of the round-trip interpolated version with the original, pixel by pixel. The difference should be small if you enlarge then shrink, but it will obviously be considerable if you do it the other way round. In Photoshop, you can do this difference by putting the two images in separate layers and setting the top one to blend type "difference" (which is the absolute value of their subtraction). Because the resulting differences are small, you'll need to either merge the layers and normalize (auto levels), or use a level adjustment layer on top of them to see it clearly.

  • @MikeMcCollister
    @MikeMcCollister 7 років тому +2

    I'm wondering if there are interpolation techniques that will vary throughout the image. For example, most of the image might be best suited for bi-cubic interpolation but portions might be better for bi-linear interpolation.

    • @fluffycarrot42
      @fluffycarrot42 7 років тому

      i was wondering that aswell

    • @florianh.6256
      @florianh.6256 7 років тому +1

      You can always use more calculation-effort and try to predict better. For example: You could set some threshhold and look further. If the values are within the threshold you would use more points to define the gradient -> Essentially weighting the curve to respect larger areas more.
      Or more visual: Use the example at 2:00. The 4th point is on the same level as 2 and 3. This meets your threshold and your gradient would be more horizontally - essentially having the resulting curve be steeper and farther out on the right side. This probably creates more problems with "overshooting", thugh you can try to counteract this, because you know that you were within the threshold and act accordingly.

    • @airraidsiren
      @airraidsiren 7 років тому +2

      There are hybrid algorithms that are more sophisticated and do things like treating hard edges differently from gradual gradients, but I've never seen one that includes bilinear in the mix. Bilinear is most often a comprise that's made for quality vs processing time (like for realtime interpolation when bicubic is too costly for the hardware to do). For typical use cases on photos and video, bilinear is rarely the most appealing option visually.

  • @timothystark4475
    @timothystark4475 3 роки тому

    Subtitles was cut off at starting 0:35. Please fix that.

  • @Tahgtahv
    @Tahgtahv 7 років тому +2

    Is there a way to do this while keeping sharp edges sharp? Imagine you have an area of black meeting an area of white. Is there a way to scale this with smooth edges without introducing intermediate color? I don't think this is exactly nearest neighber. The best I can think of, and it sounds complicated, is vectorizing the image (somehow), scaling it, and then re-rasterizing it again. I'd imagine something that did this would take some sort of threshold. Colors closer together than the threshold would be scaled together using something like bicubic, but further apart would be considered essentially seperate images sharing a (possibly curved) seam.

    • @natfailsyoutube8163
      @natfailsyoutube8163 7 років тому +2

      There are other algorithms... maybe you want to look at algorithms intended to upscale pixel art (maybe see Wikipedia article "Pixel art scaling algorithms" which describes several). Understand though that whatever the algorithm you create pixels that aren't in the source data, the result is never going to be "perfect".

    • @Kaepsele337
      @Kaepsele337 7 років тому

      I think it should work if you create two images, one by nearest neighbor, the other by bicubic, then combine them, where you weigh each pixel by the output of an edge detector.

  • @loloioi
    @loloioi 7 років тому

    Wish I watched this before doing my quiz a few months ago on cubic spline interpolation... :(

  • @wilsonc2250
    @wilsonc2250 6 років тому

    How about bi-quadratic interpolation? It is a better way to do image scaling?

  • @DaVince21
    @DaVince21 4 роки тому

    I just realized that 'reticulating splines' basically means that Sim City is busy determining the splines between each tile to form natural hills and so on.

  • @user-eq2ji2tn4x
    @user-eq2ji2tn4x 4 роки тому

    excuse me , sir , I understand how I can use Bicubic Interpolation to enlarge our image through your video , but I can't understand how Bicubic Interpolation work in shrinking the image,can you please explain that?

  • @vishu226
    @vishu226 7 років тому

    awesome!

  • @bruno_sjc_
    @bruno_sjc_ 7 років тому

    this guy rocks!

  • @jamieoglethorpe
    @jamieoglethorpe 7 років тому

    I'm missing something. This is strictly about interpolation, but a lot of graphics are curves, the shapes of things (i.e. vectors instead of pixels). The buildings in city builders come out of Autocad like constructions that are infinitely scalable, and can be viewed in perspective from any point of view. These systems can loop the loop, so to speak. My distant memory of cubic equations is that they cannot deal with the vertical. Is there some way of getting there from here?

    • @airraidsiren
      @airraidsiren 7 років тому

      What you're missing is that you're most likely thinking about a cubic function of the real line, i.e. a function of y in terms of x, where it's single-valued and continuous. Such a function can't have a vertical line, that would be a discontinuity with a single x mapping to infinitely many y values. But a cubic spline is not a function of the x-axis, it's typically parameterized between 2 points (called knots) and written as a function of t where t canonically has the domain [0,1] which represents the fraction of the way from one point to the next. So at t=0 you're right on the starting point, and t=1 you're on the end point of the spline path (which is usually the start of the next, so t=0 for the next spline section). You can have a cubic polynomial representing the path from the start to end, and it's not a function of the x-axis, but more like a function of the "axis" that is a line segment connecting the points (or at least, you can visualize it that way). No one cubic spline section can "loop the loop", but a set of connected sections certainly can.
      This is really about splines in general, not so much how they are used in this context. When you're interpolating an image, you're generating a continuous surface that is also a single-valued function f(x,y). But in the CAD world, and with vector art, you have the situation where you get the loops.

    • @jamieoglethorpe
      @jamieoglethorpe 7 років тому

      I am confused by the terminology. The function is apparently defined by two points, and the tangents at those points. I haven't done the calculation, but I expect that a cubic can be uniquely defined in those terms, provided that the tangents are not vertical. I have a vague memory of B-splines being used for arbitrary curves in vector graphics. I never studied their geometry and algebra. I think it was the mention of splines in the video that is confusing me.

  • @thomassynths
    @thomassynths 7 років тому +1

    I'm always amazed when I see people draw X's by drawing two curves butted against one another (as opposed to drawing two intersecting lines). To each his own.

    • @rebeccachoice
      @rebeccachoice 7 років тому +2

      Thomas Eding quite common when writing mathematical formulae: it's to differentiate the cross product × from the algebraic variable x (which often appears in this curved style in italics)

    • @thomassynths
      @thomassynths 7 років тому

      Interesting. Thanks for the replies.

    • @fergochan
      @fergochan 7 років тому

      It's also pretty much how you write a cursive x, without taking your pen off the page. It's how I was taught it in primary school (in Australia).

  • @edwarddoernberg3428
    @edwarddoernberg3428 7 років тому

    are there any systems designed to work with high contrast edges between regions of limited variability. the most obvious example being text.
    I am thinking first detect lines between regions, create a function to define the line including identification of sharp corners. scale up the region boundary lines so they remain crisp then scale up each region without considering any information from other regions.

  • @catlolis
    @catlolis 2 роки тому +4

    IM PINCHING AND ZOOMING

  • @hellterminator
    @hellterminator 7 років тому +2

    Took you long enough.
    Say, did you just shoot this, or did you also shoot it back then (together with video about bilinear interpolation) and are only now publishing it?

    • @Computerphile
      @Computerphile  7 років тому +4

      just shot it (well a week or so ago) .... >Sean

    • @Theraot
      @Theraot 7 років тому +4

      Computerphile, could you do Lanczos and Mitchell?

    • @MiltosK
      @MiltosK 7 років тому

      +1 For Lanczos! And if you could explain the differences between separable lanczos and non separable it would be an amazing added bonus.

  • @Locane256
    @Locane256 5 років тому

    What happens with the pixels at the edge, that don't have pixels around them to get information from?

    • @nikolajp1530
      @nikolajp1530 2 роки тому

      (this is 2 years ago but for anyone else looking thorugh the comments: you can find that if you follow the link)

  • @jezzbanger
    @jezzbanger 7 років тому

    I'm aware you'd get diminishing returns but couldn't you do a bi-(nth degree polynomial)-ic interpolation for any odd n using progressively higher derivatives, capped at a point so you don't use too much computational resources?

  • @natea4158
    @natea4158 2 роки тому +1

    did you reticulate the splines...

  • @glenneric1
    @glenneric1 4 роки тому +1

    I would differ on his statement that nearest neighbor(and only nearest neighbor) doesn't create information. All three types(nearest neighbor, bilinear, bicubic) guess at what the middle values are. It's just that nearest neighbor is a very simplistic guess. So they all create data without truly discovering new information.

  • @geeky_explorer9105
    @geeky_explorer9105 3 роки тому

    U are awesome thanks a lot

  • @aolson5795
    @aolson5795 7 років тому

    Does image rotation work any differently from rectangular resizing? Because if you rotate some number of degrees, some places may move less than one pixel's length, and not in a straight line...

    • @airraidsiren
      @airraidsiren 7 років тому +2

      Bitmap rotation uses the interpolation methods discussed in these videos, just as for rectangular resizing. You're still mapping each pixel of your result "target" image back to where its values come from in the source image, you're just replacing the x and y scaling with a rotation matrix. You transform your target pixel coordinates back to where they source from, and because these are non-integer values for all but the trivial case of 90 degree rotations, you use one of the interpolation methods to get your final value. Nearest neighbor is pretty unsightly, with a grainy look and jaggy edges, but bilinear and bicubic look nice and give the "anti-aliased" edge look to rotated lines.

  • @rrajpuro
    @rrajpuro 3 роки тому

    [5:50] - Why is there an interpolation of Spatial coordinates? Isn't it supposed to be an interpolation of intensity values

  • @subliminalvibes
    @subliminalvibes 7 років тому

    I've got a silly question!
    When it comes to watching analogue video, like Laserdiscs for example, would a mathematician use a video scaler to watch it on the big screen, or leave it alone? ;)

    • @airraidsiren
      @airraidsiren 7 років тому +3

      Using a video scaler really only makes sense if the video has already been digitized and you're trying to display it on a digital display with a higher resolution than how it was digitized. The signal path from an analog player to a digital display shouldn't resample the video at all, it should digitize it once appropriately for the display resolution.

  • @SharonMau
    @SharonMau 6 років тому

    Aloha . . thank you!

  • @puellanivis
    @puellanivis 7 років тому

    With the number of people taking screenshots of text, then pasting it in, and saving it as a jpeg, I'm surprised that you didn't cover this situation.
    Like, when the text of something has become so ridiculously blurry and spread out, that it starts to have sharp edges tens of pixels away...
    Compounding error. :P

  • @redstonechoi
    @redstonechoi 5 років тому

    thanks

  • @chair547
    @chair547 3 роки тому

    Could you do biquintic interpolation

  • @Superphilipp
    @Superphilipp 7 років тому +1

    Oooh, somebody got a fancy new high framerate camera.

  • @johndue2366
    @johndue2366 7 років тому

    Paper from a line printer, - that takes me back :-)

  • @gavindownes4541
    @gavindownes4541 7 років тому

    half way from X1 and X2 it will have a greater value than either one.
    Wouldnt this produce bright spots ?

  • @joerivde
    @joerivde 4 роки тому

    Binge watching this