Hacker News new | past | comments | ask | show | jobs | submit login
DIY microscope lenses on BMD pocket 6K camera (schweinert.com)
149 points by Cullinet on March 11, 2021 | hide | past | favorite | 68 comments



The focus stacking technique was news to me. I've been doing some macro photography of PCB components with an extension tube, but the depth of field is just so shallow that it's hard to see what you're doing. You can't read the text on top of an IC and see sharp solder joints on the bottom at the same time.

But if you put it on a threaded rod, move the camera, and take the in-focus parts from a bunch of pictures, you can see the front and back of the fly at the same time. How cool!


That's pretty cool. Maybe this would actually be a good use for the failed Lytro cameras. Changing focus after the shot is taken was always a parlor trick with little use in regular photography, but for microscopy it could be game changing. Has anyone tried microscopy with a Lytro Illum? Seems like you can still buy them used.


A lab I used to work at had a light field microscope system. Sorry, though, its existence is pretty much all I know about it since I never personally got to use it.


If you're photographing stills (like PCB components) then you might as well use a smaller aperture and increase the exposure time to get an image that is globally in focus.


This only works up to a point before diffraction sets in and the picture quality starts to very noticeably suffer, and comes nowhere close to the depth of field acquired with focus stacking. In fact, with stacking, the lens should be stopped down to the best f-stop anyway (f/8-11).


Good (Vis/NIR) microscope optics go up to f/0.56 (NA 0.9) without oil immersion. Granted, such an objective will cost you 3.5k$ [0], but they don't go to these lengths without expecting near-diffraction-limited performance.

[0]: https://www.thorlabs.com/thorproduct.cfm?partnumber=RMS60X-P...


and then stack those images. :)


with very wide apertures and magnification the depth of field may still be too narrow, and longer imaging time (if not focus stacking) would just make the image brighter not more in focus. Taking multiple shots with different depth of field and stacking them would work.


Jeff Geerling just uploaded a tutorial video on focus stacking if you want to check it out!

https://youtu.be/pinYVZxBF2Q


On my hacked Sony camera, you can program the camera to change focus and take a picture each time in rapid succession, no need for anything more than a tripod :)


There's a device called the Helicon FB Tube [1] which comes in Canon and Nikon variants, and purports to do this with any camera and lens pair it supports.

I've thought about trying one out - it's not that expensive compared to most camera things, but I'd want it for shooting handheld, and I'm not sure how well it'd play with either the recycle rate on my flashes or the movement rate of the insects I shoot this way. Probably not well with either, but for still stuff I guess it's probably still cheaper than a driven macro rail...

[1] https://www.heliconsoft.com/heliconsoft-products/helicon-fb-...


For Canon, wouldn't it be possible to also do it in software with Magic Lantern?


Yes, even the old CHDK did that job nicely on my old IXUS 100 IS. A script for this (and adaptive exposure stacking, very useful for unlit roman interiors when you're looking out a window with bright sunlight) came with the download back then.

And at least for CHDK, there wasn't actually any flashing. It just used the firmware flashing mode as a bootloader.


Apparently! I don't have any Canon gear and I'm not sure I'd reflash it if I did, although if their software is as unergonomic as I've found their hardware to be, I might - that said, while I can't try it out for myself, a bit of searching does turn up any number of howtos on the subject.


The newer Nikon cameras have it built in as well.


I tried the same a few years ago with the original Blackmagic Pocket (for video, no focus stacking). You can get pretty good microscope lenses cheaply on eBay and the rms-m42 adapter is cheap.

https://youtu.be/JwIDTtu8XnA

A lot of shakiness at that magnification level though (had to stabilise in post) and the depth of field is razor thin - this is where focus stacking with stills helps a lot.

Optically I’ve found regular super-macro lenses are better (2:1 or more)


This looks fantastic. I've been wondering if it's possible to record 180° stereo (for VR), in "close" to macro?


Thanks! Good question - the FOV with macro lenses would not be anywhere near 180°, though I'm sure you could distort the video to wrap around you.

Stereo macro seems to be a thing with stills, at least - https://www.flickr.com/groups/2158359@N23/pool/with/35314464...


Mhm.. you can't wrap a still to 180°, that is not the same effect. The focal point would need to be right where you want to take the shot. I'm more thinking of something like that: https://www.amazon.com/Industrial-Synchronized-Security-Coun.... But the lenses need to be closer together and be able to stay in focus at a much closer range. Maybe IMAX had done some macro (insects) stereo documentary.


what I meant to say is with macro lenses the FOV is narrow because of the high magnification, and with VR you typically want (very) wide angle lenses.

180 stereo VR is usually shot with two cameras (in portrait) with fisheye lenses, I've worked on a couple of these shoots. The minimum focal distance on these lenses can be pretty small (a couple of cm) so you can get sort of a "semi" macro effect, though not quite the same


Kinda opposite direction, with the launch of new very high res ("50 megapixels") Sony a1 I started thinking that with a macro objective you could use it as a sort of low-magnification microscope. With a 1:1 macro, if you crop a 4k section from the full-resolution image and draw it on a 32" display you'd get 40x magnification (sort of) if I did my math right; 1px on screen would correspond to roughly 4µm which gives some ballpark on what sort features you could see with it. But it gets better still, there are at least some 2:1 magnification macro lenses [1] out there, those would double the magnification you get.

I haven't really figured out how that compares to "real" microscopes, or even like the $100 chinese digital scopes.

[1] https://www.dpreview.com/products/venus/lenses/venus_laowa_1... and its 65mm counterpart


Scaling up a crop doesn't really increase magnification at all, though. You're still limited by sensor resolution and reproduction ratio. Scaling up the result lets you see it from further away, but it doesn't add information that the sensor didn't capture. Whatever the reproduction ratio of the lens at the focal length you're using, that's going to determine the minimum feature size you'll be able to resolve.

I have some wasp shots [1] that I took at or near 1:1 on an APS-C (Nikon DX) sensor, and I had three of them printed and framed at 36"x24" to hang as a triptych across one of my living room walls. [2] They're gorgeous at that size, but they're not sharper at that size, you know?

[1] https://aaron-m.com/2019/07/08/polistes-metricus

[2] Yes, I live alone, why do you ask? :) I originally had the middle one over my bed, but my boyfriend at the time found it offputting. Can't imagine why...


Check out Fuji's GFX100S. It's a consumer camera ($6000) that can take 400MP photos.


>It's a consumer camera ($6000)

very few consumers spend $6k on a camera, and if I spent $6k on a camera I wouldn't want it to be consumer.


To be fair, in photography nowadays, the line between professional and consumer is veeeryy thin.

I'm a hobbyist and spent 600$ on my camera, just a few years ago it was used by quite a few professionals.


If you go to photography forums it’s not the professionals buying the most expensive equipment, it’s “Uncle Bob.”

Not that professionals don’t have need of the high end stuff, depending on what they do. If you’re a sports or wildlife photographer you might need that $15,000 lens. If you’re a studio photographer with high end clients you might want that aforementioned megapixel beast.

Try to look up information on either and you’ll be guaranteed to see some truly bad photos by people that care primarily about gear and have the money to spend on it. The Nikon D750 is still a well regarded wedding photography camera, and it came out on 2014. That’s a long time, technology-wise. I upgraded one of mine last year to a D850 and another this year to a Z6ii, and I don’t feel as if I’ve gained all that much. They did what I needed them to do.


I think photography forums have serious sampling problems that don't accurately reflect sales of camera equipment, and I wouldn't take informal or formal surveys of photography forums as evidence that only rich 'uncle bob' buys expensive camera equipment.

My experience is that many professional shooters have much larger lens and accessory collections, have much more modern cameras and generally tend to have 2-3 of them for the purpose of having a second lens ready to shoot and a spare body on hand. For every uncle bob there are a lot of small time pros with 3x cameras as good as bob's not posting about them on forums.

I think that in general many 'professionals' aren't shooting with crazy cameras because they don't need them. a Used 5d2 is an amazing camera and its super cheap. It produces professional pictures, provided you can take them.

But the build quality and feature set make it a pro camera, not its price.


I completely agree with you in the regular pro/prosumer end of things. I have 3 D750s, a D610, a D850, and a Z6ii. I have a complete set of 1.4 prime lenses, and some high quality zooms on the long end. I’m “just” a portrait and wedding photographer.

In the ultra high end things get a bit wonky though. Most pro photographers don’t want to deal with the downsides to something like Nikon’s 58mm f/.95 lens, or a medium format digital camera. They’re niche, and have niche use cases.


I spent some money on my 50d a long time ago, and its still a great camera. Then I spent thousands on EF lenses instead and those lenses will move to a 5d2 or whatever used body I find to replace the 50d.


Just curious: these are (mostly, weighted by cost) zoom lenses, right? Or did you invest a lot into very fast prime lenses?


I think fast primes are amazing but not convenient.

My lens collection currently looks like this:

Canon 50mm f/1.8 (because its fun and cheap)

Canon 17-40mm f4/L

Sigma 17-55mm f/2.8

Canon 70-200 f/2.8 L

Canon 100mm f/2.8L Macro

You can cover quite a bit of range with the 17-55 and 70-200 in just two lenses.

I also have the original Canon EOS M with the 20mm pancake lense (which is super old at this point) with an adapter to stick EF lenses on it.

When I upgrade to an actual full frame body (my 50d is an APS-C size sensor) I'll probably want to see how zoomed 200mm feels but until then I'm pretty happy.

I still do a fair amount of hobby photography but it's one of a dozen hobbies so they probably don't get as much attention as they should.


I bet medium-format 1:1 macro lenses are spendy, though.


Only if they're fast. Slow objectives would get by with lenses from e.g. regular eyeglasses arbitrary-aspheric production lines. It only gets expensive (>1000$) when you need fancy glass elements (or manage to waste a lot of money on inefficient R&D... computers are really good these days, and at least for fixed-focus prime lenses (you want 1:1, right?) the parameter space is fairly small.

I can highly recommend [0] for some reading on how simple optics can be if you can optimize aspherics for a fixed focus. Just to state the obvious: two identical infinity-focused objectives can be placed with the infinity-corrected sides looking straight towards another, for a physically long 1:1 macro "lens".

I wonder if there is a decent topology for a decently-high-NA reflective objective in the 1:1 to 1:10 (object:sensor) magnification range. And also whether some of those topologies would cope with a (sensor-sized) reflective spatial light modulator (LCoS/DLP would seem most practically relevant) in place of the sensor.

I still get that mouth-watering imagination when thinking about direct digital (maskless) photolithography, as the flexibility is enormous, especially regarding rapid prototyping of highly integrated circuits (350 nm is the limit for single-patterning using aluminium-coated MEMS modulators (aka TI's DLP technology), due to the UV reflectivity drop below 400 nm and thermal limits of the MEMS device).

[0]: https://www.telescope-optics.net/


The back to back infinity-focussed objective set up works nicely with 2 sets of cheap infinity microscope objectives 2x or 4x back to back in a thorlabs tube. Paired lenses cancel out a lot of aberrations (but not all of them). I use this setup regularly for fairly close up, highly planar projective work. For 'low magnifications' say 2:1 and up the Edmunds 2X, 0.15 NA, Ultra Compact Objective has decent price/performance, but this is for sensors in the 1/1.8 - 1" range. If you come up with a nice, planar, cheapish 1:1 design for large sensors, drop me a line. (Disclaimer - not an optics person, but peered into the fascinating rabbit hole)


What numerical aperture and image circle are we talking about? 0.15 NA leaves a lot on the table (at least 0.6 NA objectives can be had for still-decent prices).

But I'd probably look at a Zeiss Planar style design.

In general, a 3/5-element design (achromat/apochromat) should do the trick I think, provided you have access to arbitrary aspherics. And in case you can accept a shift in focal length with wavelength (like monochromatic photolithography would), a single symmetric element should be up to the task, unless I'm missing something.


Thanks, we are pretty low budget. Image circles are in the 1/3", 2/3" range and we are looking at patterns with say 5 to 50 um pitch on a flat planar object, monochromatic, we control illumination, standard 3.45 um pixels (so 1k to 5kish). We have a decent small design with two elements (good planarity, ok resolving and ok ish depth of field are what we care about). But we also sometimes look at larger frame (aps-c and up) and are also interested in smaller (eg VGA Omnivision type tiny module but with a decent planar macro lens e.g. f= 4 or 6mm, for 0.5 or 1x mag would be interesting). We do imager based metrology at the sub um and nm level


Yeah, sounds like a normal https://en.wikipedia.org/wiki/Double-Gauss_lens from BK7 or so should do the trick. You'd have significant chromatic abberation, but with monochromatic illumination that's not a problem.

This would just be 4 normal lenses, afaik. And you should be able to reach around 100 mm image circle I guess with the low NA you get away with at that relatively low resolution.


Many wide-angle lenses are amenable to reverse mounting, which gives typical magnifications of around 5x or higher. Also, the working distance is almost constant (about the flange distance, so ~40-something mm for SLR lenses) across the range of magnifications, unlike macro lenses where adding extension continually reduces working distance until it gets zero/negative.


Focus stacking is great and so is high dynamic range imaging so to use both requires N by M images where N is number of focus stacking images and M number of hdr images plus the software to combine those into one output images


We have a lot of Mitutoyo Plan APOs floating around at work, sometimes they come up on ebay. If you can get your hands on a 5x or 10x those are great for quickie high mag photography. Highly recommended.


I'm disappointed - there is no DIY lenses here, not by my book, no glass polishing or optical precision casting, just assembling already existing optics.


The fact that I could go and buy this tomorrow is insane. Not that long ago this would have require research lab access


other than for the lulz of "i shot photos with a video camera", this would have been so much easier with a mirrorless or DSLR. why record 160 frames to just export 1 frame. also easier to get >6K images as well.

sometimes, the "just because" really just makes me shake my head. I love the 3D printing of an adapater and playing with lenses in ways never envisioned by the vendors. after going through all of that hassle, to just tack on the hassle of exporting stills from video sequences is just odd.


Focus stacking is indeed done with a DSLR most of the time. You cannot get nearly enough DOF at this scale with any kind of lens.

The author can do it from video because he has a 6K camera, and that is actually way easier compared to manually taking 160 separate shots + changing focus for each of them (you need specialized hardware for that, most cameras will give you a dozen shots at most due to coarse focus increments).


How do you figure? You take a single image, then move the camera or adjust focus, lather, rinse, repeat. In video, you do the same thing, except now you have to process each video clip to get export the single frame.


As someone with extensive experience in doing what you're describing with a DSLR, the video option sounds like a wonderful shortcut and I've wondered if it was possible to do it with my current equipment.


Oh, now I see why you’d think that. That would be insane.

No, you record a single video while moving focus and export each frame - that’s what makes it easier.

> The camera itself is mounted on an old edelkrone slider with a motion module. I record short 4K ProRes422HQ clips and use them for focus stacking directly in helicon focus. For this fly I used an average of 160 frames [from one clip]


Did you read the article?

"I record short 4K ProRes422HQ clips and use them for focus stacking directly in helicon focus. For this fly I used an average of 160 frames."

Clearly, he recorded multiple clips, and then exported individual frames from individual clips.

After all of that, he didn't even record in RAW.


"Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that.""

https://news.ycombinator.com/newsguidelines.html

Also, can you please make your criticisms thoughtfully rather than as shallow dismissals or snark? Your comments in this thread are rather on the wrong side of the line, starting with https://news.ycombinator.com/item?id=26427684. You obviously know a lot about this topic, which is great, but the thing to do with that knowledge is share some of it, so the rest of us can learn, and leave out the putdown aspect.

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...


Why the aggressiveness? If you want to believe that, be my guest.

This is a film production company, they most certainly have a stack of DSLRs they could use it it was that much more convenient, and with much better resolution. Not sure why you’d assume stupidity.

The software supports importing videos directly: https://m.facebook.com/heliconsoft/photos/new-version-of-hel...

As for RAW, unless you need that bit of extra dynamic range, it makes no difference (they don’t here, as it’s a studio shot with fully controlled lighting), ProRes422 is enough for 10-bit HDR even.


He says he records short clips and uses 160 frames from them. I don't see why you'd choose to read it as "recorded one video per depth".

And sure, it's not raw, but ProRes422HQ is pretty damn good, being both high pixel depth and very high bitrate.


This has to be the method. It makes the most sense given the strengths of a 6K video camera. Record lots of frames and use a dolly to take focus slices of the subject.


Processing 160 (or more, many many more) RAW files is much more of a pain in the neck than just taking the time to get everything right in camera and dealing with the jpegs.


Eh, my computer can deal with a RAW file in less than a second on one core, wouldn't be that big a deal.

Plus, a lot of RAW files are TIFF, so I'm sure GPU-accelerated stacking is in reach.


I've never done macro photography before, so this might be a silly question - but could you really get shots like this from a single DSLR image? Most macro photos I see have some part of the image in razor sharp focus, then a strong bokeh effect for the rest.


Macro photography in my limited experience is as much about technique as equipment. No matter the camera, with that level of magnification you have to stack the images to get that much of the subject in focus. You can increase the depth of focus using the Scheimpflug principle and a smaller aperture, but there are real physical limits to how much. Decreasing the diameter of the aperture is limited by diffraction -- the image becomes less sharp even if more is in focus.


you can use the same software this guy was using, and take multiple photos and stack them https://www.heliconsoft.com

the comment you're replying to was pointing out that using a camcorder and extracting stills from the video is a PITA, and it would be more straightforward to use a DSLR that can simply take stills. and they're right, but if the blackmagic was all this fellow had... well, it clearly worked well and a DSLR or mirrorless would've cost a few hundred dollars more.

since he was using a 3D printed adapter instead of buying one for $10, i can only assume he blew his entire budget on the blackmagic hardware.


The actual article said he didn't want to wait for 4 weeks while something shipped from China, so he 3D printed. Nothing implied not being able to afford a $10 part.

I would also stipulate that someone with a BMD 6K camera has other cameras as well. The BMD is typically the upgraded to vs started with type of camera. Sure, edge cases and what not


> Nothing implied not being able to afford a $10 part.

take a pill. it was a joke about the price about the blackmagic hardware.

> I would also stipulate that someone with a BMD 6K camera has other cameras as well.

no kidding.


Not from a single image. The reason for the set up is to obtain many images at different focal distances. That can be done by either moving the camera (of any kind) or by changing the focus for each image.


Typically, it is not done by adjusting focus, and uses a sliding rig to change the position of the focal plane. For most camera lenses, the precision of the focus ring mechanism is too dodgy to precisely change the focus. With the slider, the focus ring is left alone, and the precision of the slider is use to bring the next "layer" into focus. The author even commented on the slider he used was not as precise due to it being belt driven and that switching to a lead screw system would have provided more accuracy.


OK. I have no first hand experience, but I saw that Helicon makes a product which incrementally adjusts a camera's focuser.

https://www.heliconsoft.com/heliconsoft-products/helicon-fb-...


Communicating directly with the lens' focus motors does sound more appealing and more compact than a sliding rig. However, "Helicon FB Tube automatically shifts the focus by one step with each shot thus producing a stack of images of unlimited length that can be rendered into a fully-focused image." That would mean that it is waiting for a shutter release type of signal from the camera body which would not be useful in shooting video as the original article's workflow.


According to a web page I found from 5-minute googling[1]:

  Depth of Field[mm] = (2 * u^2 * N * c )/ f^2 
where:

u = distance to object[mm], N = f number(focal length divided by effective aperture diameter), c = diameter of acceptable circle of confusion[mm], f = focal length[mm]

Assume Sony A7M4 with Milvus 2/100: let u, N, c, f = (160mm, f/22, 4um, 100mm): DoF = 0.396mm ~ 1/3rd of a penny thick

The answer is no, not possible without focus stacking. But focus stacking is a SLR technique anyway, so the part that he's flexing his fancy camera a bit is true.

1: https://damienfournier.co/dof-the-simplified-formula-to-unde...


I think the flex here is photographic quality images from a video camera. 6000 pixels across is a higher resolution than the top digital cameras from a few years ago. Combine that with an easy way to extract hundreds of frames which can be stacked and you have a relatively simple way to create these deep macro photos. Similar techniques (e.g. lucky imaging) have been used for years by astro-photographers even in the days of 320x240 webcams.


It’s a mirrorless with 24MP APS-C sensor. Top mirrorless from a decade ago already had 24MP APS-C sensors. Top smartphone from a decade ago had better resolution(41MP).

I’m not saying the camera can’t be impressive, I’m saying you’re vomiting marketing script.


I'm not doing anyone's vomiting for them. I'm not in the target market here. There's no way I'm dropping $2000 on a camera that shoots only video.

As far as marketing goes, 41MP of noisy pixels from a 1/1.2" 2012-vintage sensor is not comparable to 24MP from today's APS-C sensors. Here's an image sample linked from a DPReview article from 2013 to get my point across.

https://www.dpreview.com/files/p/articles/7739037780/nokia-l...

From this article: https://www.dpreview.com/news/7739037780/nokia-image-samples...


No. That's the point of focus stacking. However, using a still camera, you eliminate a lot of the work that was added because this was video.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: