Using match photo for elephant research

I am attempting to measure the distance from the elephants head to the mirror. I know sketch up can be used to make models of buildings or rooms when some of the measurements are known by matching the photo and then making a model out of it.
I know the size of the mirror and the exact sizes of the elephants head.

I will be able to make a model of the elephants head which can then be fitted to the sketch up model once I have aligned it to the body. The problem for me is knowing if the perspective is correct. If I can get the right perspective I can then make a model of the elephant head and the mirror and then measure the distance between the two in sketch up.

When I upload this image I can match the horizontal red lines to the top and bottom of the mirror. The problem is the photo does not have a lot of depth that can be measured so I cannot place the green lines. But I can place the vertical blue lines to the vertical lines of the mirror. When I do this the green lines seem to fall into the correct place but I don’t know if this is actually correct.

To the sketch up community- Does this sound like a viable method? Is it possible to set the perspective correctly using the horizontal red and vertical blue guidelines and not the green?

The match photo feature relies on (at least some) orthogonal geometry and at least one known length. In this image, the concrete wall is curved and the elephant is not standing orthogonal to the wall.

If you had already created a model of the enclosure (maybe from a ground plan), then you could use match photo to align the camera to the existing model (using the orthogonal roof or the straight wall at the right). Then it would be easier to draw an edge from the elephant to the mirror.

What you are trying to do is photogrammetry. The Advanced Camera Tools extension would help. Look over what Joshua Cohen did Tips & Tricks.

2 Likes

I could make a model from the enclosure using the roof as my orthogonal geometry. How would I use match photo to align the camera to the existing model? The roof and straight wall do not appear in all of the video shots.

If I made a model of the enclosure using the orthogonal roof could I then match the photos (like the one above) to the model by using the mirror to line them up?

Have you tried importing a top view of your enclosure by using Add Location from the File menu? You can begin modeling on top of that.

I made a model of the empty yard that shows the mirror and it is at the proper angle and the grid is set to the height. Then I matched a photo with an elephant, like the one above, to that model. Then I realigned that photo to the model. So now how do I get a measurement to the elephant. In order to have the right perspective all lines have to start from the origin. If I make a line from the origin to the elephant it is not on the right plane because it is on the red or green axis.

I linked sample files set up by Joshua Cohen on the SketchUp Sage mentioned above. Specifically, his Ford Building examples show how he sets up SU. A good one to examine is called ford-building-act.skp, as it used both Photo Match and the Advanced Camera Tools to align a Photo Matched building to an image.

When you open ford-building-act.skp, one thing to notice is the use of Scenes to save particular set-ups you may need to return to.

Go to Scene MP (ACT). This shows the photo matched model aligned to match the perspective of the image. The image was imported as a Watermark. To add a watermark, open the Styles browser from the Window menu. Click on the Edit tab then the Watermark button. Click on the image used as the watermark (there’s only one in this file.) That activates the edit option (the gear.) The image is set at Stretched and Aspect Ratio is locked. Play with the slider to see how well the model was aligned with the image.

Joshua used ACT to position a custom camera to align the model against the watermark as ACT can readily roll, tilt and pan. To use ACT you need special information from your image to find the focal length and image width. You go this extra step because the camera optics as specific for each camera and affect those perspective lines the camera depicts in the pictures it takes. While the SketchUp Sage section on Photomatch and ACT is a bit incomplete, I did show how to find the data for an ACT camera.

Pattern your file set up similar to what was done in the ford building file. Set up Scenes (update the Scene after making critical changes,) Align the enclosure to the watermarked image of the enclosure (save Scene,) add sized elephant components and position them to match.

@catamountain has done a nice job compiling & extending some of the material I presented at Basecamp 2014. I’m honored to make an appearance on the SketchUp Sage pages!

In this situation, I think Advanced Camera Tools (ACT) might give better results than the Match Photo function, because of the orthogonal geometry issue that @Aerilius referred to above. I just added to the material listed on my ACT Basecamp Workshop page. Take a look and see if it helps. I’d also be happy to talk to you about it on the phone. Here’s my contact info.

One thing you might consider is whether use of photogrammetry is overkill in this situation. In looking at your photo above, my first instinct is to see if you can use an object of known length (the elephant) as a “ruler” to gage the distance to the mirror. This would likely give you results at least as accurate as you would get with SketchUp.

1 Like

Thanks so much for your help. I am unsure if I can use ACT because of the focal length. The camera has a zoom function so the focal length is a range. Also the zoom was adjusted at different times so I think that means I cannot use the focal length as a measurement.
This is why I then attempted sketchup. I saw that architects used it to make models of buildings and could make measurements from it. But I would be very open to easier ideas like using the body length. If I used the length of the elephants foot and use that a a measurement to the mirror will it work if the picture is at an angle? What I attempted to do was to use match to photo to upload a picture and then frame the mirror and the area infront of the mirror. By doing this I can then bring this model into other pictures and match up the mirror. I then adjusted the grid so that the measurement of the mirror was correct. In this case 8x8ft. So then I thought the grid lines that project onto the ground surface would also be correct to this measurement and I could use them but I am not certain of this. Below is a screen shot of this.
Inline image 1

My original idea was to add a model of the elephant head but when I make lines for the model they all have to come from the axis and therefore they are on a different plane from the elephants head. Can you only make measurements along the planes?
Any suggestions at this point would be helpful. Thanks,Jennifer Savoie
Inline image 2

Using a calibrated perspective grid for measurement is a good idea. In looking at the screen capture you posted, it seems like you have it set up correctly. One thing to be careful of is the point you have set as the origin (where the sand meets the wall) is probably at a different elevation than the sand that the elephant is standing on. From looking at your other screen capture, it looks like you have accounted for this correctly by measuring not to the bottom of the foot, but to a point on the elephant’s front leg that is level with your origin point.

I would recommend taking one further step: Using the same plane that you have set up to measure distance to the mirror, also measure distance from the front to back legs. Make sure this measurement makes sense for that particular elephant. This will give you some added confidence that your calibration is working correctly.

One final note for anyone reading this thread for info about ACT. Many camera lenses have a a “zoom range”. In order to determine the focal length that was used for a particular photo, you can inspect the meta data embedded in the image file. This is called “EXIF” information, and it can be found by selecting “get info” or “properties” in your photo viewer. For more detailed information, try downloading an EXIF viewer program, or uploading your image to Jeffrey’s Exif Viewer. Keep in mind, this only works when you have access to the original camera files. If the files have been modified by cropping / scanning, or have been converted to a different format (ie PDF), you may be out of luck.