[HN Gopher] Show HN: BokehCamera - Blur webcam background photor...
       ___________________________________________________________________
        
       Show HN: BokehCamera - Blur webcam background photorealistically
       using RealSense
        
       Author : dheera
       Score  : 53 points
       Date   : 2021-08-31 16:52 UTC (17 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | teawrecks wrote:
       | You're going to have photographers arguing that this is merely
       | depth of field, and for it to be called bokeh you need light
       | sources/reflections to bloom in the shape of the aperture. Which
       | would be a super cool feature.
        
         | dheera wrote:
         | Yeah that would be cool! I guess that's actually not that hard
         | to implement since I just need to do some sort of 2D
         | convolution with the aperture shape, instead of just cv2.blur.
         | 
         | The tricky thing is that in order to get different amount of
         | blur at different depths, I interpolate between precomputed 3
         | levels of blur, since that vectorizes well at -O3, I'm not sure
         | how to compute a per-pixel varying blur efficiently without
         | going to the GPU.
        
         | underwater wrote:
         | That's what I thought this was doing, based on the description.
         | The reason that Meet backgrounds look fake is because they do a
         | Gaussian Blur instead of simulating a lens. A physical bokeh
         | will blow out highlights, whereas a Gaussian Blur will smooth
         | out bright spots.
        
       | black_knight wrote:
       | Nice!
       | 
       | If you are not on a budget, you can use a mirrorless camera with
       | a big aperture (say f1.6), wide angle lens as a "webcam" by
       | connecting the HDMI out of the camera to the computer using an
       | Elgato Camlink. That will also get you a nicely blurred
       | background.
       | 
       | I do this, and a lot of people do a double take whenever I enter
       | a zoom call. Best commment so far was "What is happening? Are you
       | in a movie?".
        
         | dheera wrote:
         | Yep this is a neat trick too. Also I must say (as a hobbyist
         | photographer myself) that even if you're on a budget, if you
         | want to go the optical route, you can easily grab a cheap used
         | DSLR like a Canon 60D which often goes for <$200 used, and slap
         | on an old M42 Russian lens with a conversion adapter and get
         | fantastic bokeh for video calls.
         | 
         | The mildly annoying part is most DSLRs don't have an AC adapter
         | input to allow them to be constantly on, but you can buy a
         | "fake" Canon battery that sits in the battery compartment and
         | wires in AC adapter input.
        
           | black_knight wrote:
           | > The mildly annoying part is most DSLRs don't have an AC
           | adapter input to allow them to be constantly on, > but you
           | can buy a "fake" Canon battery that sits in the battery
           | compartment and wires in AC adapter input.
           | 
           | Yeah, I left out that detail. One should also make sure that
           | the camera has a clean HDMI output. I can't use my old EOS
           | 500D for this since the HDMI output is grody with focus aids
           | and stuff.
        
             | Schinken_ wrote:
             | I experimented with the old 550D of my dad. I got a
             | successful clean picture using either USB (canon supplies a
             | "USB Webcam Software", though the 550D is not officially
             | supported it works. I also managed to get clean HDMI out
             | using "magic lantern" (a firmware modification for some
             | canon DSLRs which enables a lot of hidden features, allows
             | clean HDMI, and on a beta branch allows "simulated focus
             | bubtton press" to keep the camera from shutting down due to
             | inactivity)
        
             | azinman2 wrote:
             | Also overheating. I don't know about the Canon but my Sony
             | had to have a number of settings changed to keep the temp
             | down, and even then on a hot day it'll shut itself off.
        
               | lifeofpi331144 wrote:
               | You don't need to do either. Canon offers a webcam
               | utility driver for free, which offers a clean interface
               | via microusb->usb.
        
               | azinman2 wrote:
               | I don't know about Canon, but the Sony one is lower
               | resolution than the HDMI capture. I was able to buy a
               | cheap Chinese USB-HDMI capture card for like $8 and it
               | works actually quite well, and is driverless.
        
             | brippalcharrid wrote:
             | You don't even need to use HDMI or have a capture card; you
             | can connect the camera with USB and use
             | gphoto2/v4l2loopback to present it to the OS as a video
             | input. With older cameras that have USB2, you will be
             | limited to a lower bandwidth and resolution (200Mbps ->
             | 1024x680), but it still looks fantastic, especially with
             | high-quality lenses and shallow depth of field that enables
             | video codecs to encode the out-of-focus-areas efficiently
             | and concentrate on detail in the focal plane.
        
         | dylan604 wrote:
         | I would recommend a less wide angle. If you have the space so
         | you can get a 50mm, you'll get much better bokeh than a 20mm.
         | 
         | The thing with shooting WFO, you'll have tissue paper thin
         | focal plane. Moving forward or leaning back could throw you out
         | of focus.
        
           | otterley wrote:
           | A modern camera like a Sony A6400 (which I use) has facial
           | focus tracking and deals with this quite well. I use a 16mm
           | prime lens for my video calls -- 50mm would be way too close
           | for my facial distance (about 2 feet from the lens).
        
         | Version467 wrote:
         | You probably don't even need to shell out for an elgato
         | camlink. Most halfway modern canon cameras are supported by
         | their webcam tool (iirc they expanded support to a lot of
         | models during the pandemic) and I'm pretty sure that Sony has
         | an equivalent as well.
         | 
         | If you're on Linux there's a way to make this work with
         | gphoto2, but it involves a little bit of fiddling and is less
         | plug and play.
        
         | vmception wrote:
         | I have an A7sII, I might do this just so people think I have an
         | OnlyFans so I can find out who is in the market when they DM me
         | 
         | Honeypot!
        
         | ezconnect wrote:
         | I can't say it's a budget setup, that lens f1.6 is expensive.
        
           | otterley wrote:
           | I've got a Sigma 16mm f/1.4 lens (Sony E mount) and it costs
           | about $350. Not _cheap_ but not ludicrously expensive,
           | either.
        
           | azinman2 wrote:
           | I have a Sony rx100 that I do this with, which is just a
           | point-in-shoot. It has excellent picture quality and bokeh.
           | It looks much better than this.. the blur is the same
           | everywhere in the background, which isn't what it looks like
           | from my Sony.
        
           | detaro wrote:
           | a) the comment you are replied to said "if you are _not_ on a
           | budget "
           | 
           | b) if you presume "mirrorless camera" as a baseline, a prime
           | 1.x at roughly 50mm (equivalent) is almost always one of the
           | budget lens options.
        
       | ricardobeat wrote:
       | Are there any readily available stereo cameras besides RealSense?
       | Turning this into a product for video conferencing would be a
       | huge hit, been thinking of it for a while.
        
         | dheera wrote:
         | OP here!
         | 
         | Here are a few:
         | 
         | - Structure Core: https://structure.io/structure-core Closest
         | to RealSense in functionality that I've tried so far, but
         | pricier. Software is in a private developer portal instead of a
         | Git repo where everyone can submit issues and pull requests and
         | comment, so it's not as easy to get help as RealSense when you
         | run into issues.
         | 
         | - Mynt Eye: https://www.mynteye.com/ From my understanding the
         | S models eat into your GPU and the D models have on-board
         | processing, but the D models seem sold out.
         | 
         | - ZED: https://www.stereolabs.com/zed/ They eat into your GPU.
         | No on-board processing.
         | 
         | I'd be very interested to know about others, especially if
         | there are more that can do on-board processing, since I
         | typically need my entire GPU for other tasks.
        
       | vzaliva wrote:
       | Looks great, but my video conferencing setup is on Mac. If there
       | is something similar for MacOS?
        
       | itake wrote:
       | seems like RealSense is winding down?
       | https://www.crn.com/news/components-peripherals/intel-says-i...
        
         | tim-fan wrote:
         | Yes, although it's not as bad as it initially seemed; the
         | stereo product lines will be continued.
         | https://www.linkedin.com/posts/andersgj_i-can-share-this-mor...
        
       | [deleted]
        
       ___________________________________________________________________
       (page generated 2021-09-01 10:02 UTC)