Flatbed scanner, or photo with grid paper in background.
Warp it until the gridlines are straight.
I don't know how to do the last part - I suck at photoshop.
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online
Reminder: The terms of service apply here too.
Logo design credit goes to: tubbadu
Flatbed scanner, or photo with grid paper in background.
Warp it until the gridlines are straight.
I don't know how to do the last part - I suck at photoshop.
+1 for a flatbed scanner. Put a ruler somewhere on the bed for scale. If you use fusion 360, you can add an image to a sketch and scale it to be the correct size. That said, if you're going for a perfect fit it's really hard to beat a pair of calipers and things like radius guides unless it's a super complex shape.
Great call out on lens distortion. Photoshop, along with most other high feature image editors editors, will often have a lens correction option if they have a built in profile for your lens. Darktable is a good FOSS option. You still need to be absolutely parallel to your object though.
The problem is that there is a ridge/groove/ridge structure that is used for a seal and requires accuracy of a spline without constant radius. I can warp and bend anything in GIMP. This would be possible if the image has distortion only on Cartesian planes, but this is fisheye plus minor Cartesian alignment. I don't think that amount of complexity is reversible.
The scanner idea is probably best, but I don't have one that is accessible any more. I might try from a distance with some graphing paper.
The scanner will only work if your model is absolutely flat. I spent some time trying to model a baseplate for my camera that I wanted a glove like fit on. In the end I had to iterate a ton. I suspect this was due to
Good luck!
Dark table corrects lens distortion based on the design of the actual lens, not the image itself. The grid it just to check in after the fact. I'm not aware of similar tools in GIMP. It's trivial in Darktable though, as long as your lens is in the database.
Don't use a fish-eye lens, it's lense distortion will be the worst and most difficult to correct. Use a lens with a longer focal length, ideally a prime lens with a fixed focal length. If you maximize focal length and distance to your object as much as is feasible, you will have already flattened the image (minimized lens distortion) a lot. If you use a prime (fixed focal length) lens from a popular brand, Darktable can remove the remaining lens distortion.
You can remove all lens distortion by using a pinhole camera, which has no lens. But that's probably going to be a tricky setup without an expert.
As others have said, using a flat bed scanner will save some work. If you need to photograph it though:
Use paper with grid lines as background (not sure the name, used to use it in maths at school). This will give you not just an index for scale but also for 'squareness'.
Position camera perpendicular to subject
Use a telephoto or zoom lens from a distance rather than wide angle from close up to minimise lens distortion.
Import image into GIMP or photoshop and use rulers, guides and transform tools to scale the image correctly and make it perfectly square.
Matching the colour perfectly is more complicated and I won't go into that here.
Let me know if you need any more tips. I photograph a lot of artwork and documents.
To build if you’re doing this a lot and can’t use a brand lens with known correction data in darktable, set up graph paper and phone camera on a tripod to keep everything consistent, then photograph the empty paper. Create a transform in gimp to make the paper completely flat / square, and then just reapply that transform for every object you need to capture.
Graph paper is the squares paper, I believe :)
Do you have a flatbed scanner? Like a photocopier printer?
Literally put the item on the glass of the flatbed and hit scan, stick an etched mm ruler beside it facing the scanner if you want scale.
It's generally the most effective way by far to perform this.
I've used it to copy the perfect profile of an extruded aluminium ebike battery housing, to print a replacement cap after the first got cracked.
Basically when you try to use your phone to perform a task like this, you'll need to account for the inherent lens distortion of your camera, which is a pain in the ass
A decent laser etched steel carpenter's square should run you $10-15 and give you 2 dimensions!
I see 2 problems. Both can be solved.
Position of the camera sensor plane parallel to your object's plane.
Place a sheet of squared paper on the table for the test shot. So you can see the proper alignment in both dimensions at once. Use a tripod to fix your camera above the table.
Tell the camera to insert a little time delay (3-5 seconds) when shooting to eliminate the motion from your finger's push.
(Edit: if you really want to stay very cheap, you could try without the tripod. But use the squared paper behind your object. Then do it all in the post processing).
Lens distortion.
Use a lens of a well known brand.(I don't know if it is possible with a phone instead of a real camera). Then use the software "darktable" for post processing, because it has a library of lenses and can properly correct the distortion with 1 click.
i believe you need distance. but you'll loose resolution. the lens distortion will be way less fish-eye'e if you take the picture from meters away instead of centimeters. photo software like darktable also has lens correction for lots of camera-lenses. but not for smartphone lenses i believe. 🤔 not sure though.
A scanner would be your best bet.
But you could go wild and ditch the photo idea.
The original piece was modeled in CAD. Simply follow the logical path for how it was originally done.
Measure the outermost dimensions and draw a rectangle as construction geometry. Then play around drawing a couple of circles - chances are that the top and bottom curves are circles and are trimmed and joined with eachother with say blend curve to preserve tangency.
Also measure the distance of the holes to the rest of the geometry. How far are they from the top and sides. You could measure their distance to eachother crosswise too to narrow down the measurement error.
The geometry is built around simple measurements, if you can work out the sketch tools and constraints, you can probably match the original with high precision.
That is what the purple overlay is already. However there are multiple ellipses that are not the same and very minor variation is important. The original part was likely made using surfacing workflow and not a parametric sketch type workflow. The error really needs to be ±0.05 or better, thus the reason it is worth chasing the picture based reverse engineering.
Are you sure the part is as complex as you say? It just looks like lense distortion to me. You can't get an accurate copy from a simple photo. You need special equipment to capture the true proportions
Flatbed scanner, as someone else said, would be best.
For a camera take the photo with the highest focal length you can (biggest zoom lens on your phone). Fill the frame as little as possible (distortion gets worse as you get closer to the edges). Both GIMP and Photoshop have filters to remove lens distortion. It would help to put two straight edges, (one horizontal, one vertical) near the edges of the photo. When you remove the lens distortion properly these lines will become straight.
You could also try photogrammetry to get a rough model to use as a reference.
I would use a fixed document camera with a height adjustable holder/desk for the actual piece of the board. The former are often fairly high quality in terms of resolution at their fixed focal length as long as you have good lightning and can often be found for cheap used. They definitely will also have lens distortion,but it should be easy to create your own profile to counteract this when doing a few calibration runs. (I think there I came around a tool for that once,but can't find it now)
The height adjustable holder/desk makes it fairly easy to always keep the actual image plane in the same distance so your profile once calibrated would fit, additionally you can use it to bring the pane of the object in the right angle to towards the camera if it isn't "flat" enough. I personally would try to adopt a 3D milling table from AliExpress for it, put it in a box below the actual image pane and use a digital angle meter to make sure it's actually flat
With that you should be able to achieve an accuracy below 0.1mm at least
If you can rig the camera so it will stay at a fixed distance from the subject, you can stitch together as many exposures as you need and it will minimize the distortion. Keep a grid in the background to help with stitching. The Google Photoscan app does something like that.
Try a few transfer methode. Try using carbon or soot and press the object on a paper. Then scan the paper. Build the outer shape on CAD then measure the smaller details and crevasses.
There is probably a copy shop near you that will let you scan something for a few bucks. Well worth twiceithe price just for access to high end equipment.
I don't have any idea, but hey - cool project!