amrgomaaelhady / SynthoGestures

This repository has the SynthoGestures Framework.
MIT License
4 stars 0 forks source link

objects near to the camera look blurry #2

Closed goutamyg closed 3 weeks ago

goutamyg commented 3 weeks ago

Hi,

Upon saving the uncompressed frames using Sequencer, I see that the objects near the camera (highlighted in red) look blurry compared to the face of the mannequin. image

I tried following things: (i) Disabled motion blur in the Project Settings (ii) Varied Depth of Field parameters under GlobalPostProcessingVolume (iii) Varied the RGB camera's Lens and Focus Settings under CineCameraActor34

but the blurring of nearby objects persists. Can you suggest how to fix this issue?

amrgomaaelhady commented 3 weeks ago

Hi, as mentioned in the paper, the RGB is the default camera by Unreal Engine, and unfortunately, I have no control over how it is modeled. However, I can suggest the following solution, you could simply move the position of the camera backward as if it is inside the engine to get the correct focus (The camera position can be easily found in the settings or use the configuration .json file), and disable/hide the car interior to remove occlusion. You could also model your own camera behavior as we did with the depth and infrared cameras, but that is a lengthy process.

That being said, for realistic gestures, I wouldn't recommend using the RGB camera without modeling a more human-like hand. That is why we are using the depth camera in the paper, as it won't differ much between a human-like and a robot-like hands.

goutamyg commented 3 weeks ago

ok, thank you for your reply. Changing the location of camera (i.e., placing it backward) seem to not completely solve the problem. I checked the CameraType RGB and it does not have any operation causing the blur. Screenshot 2024-06-21 121057

The issue seems to be due to Depth-of-Field being applied somewhere in the framework, which I need to find. Thank you again for your kind reply.

I have a question regarding the camera location: There are three places that define the camera location coordinates (i) camera.json, (ii) SettingsActor, and (iii) the location of CineCameraActor34. The coordinates in the json file and SettingsActor match with each other, but not sure what exactly is the purpose of CineCameraActor34 (as well as CineCameraActor2 up in the sky). Can you please clarify?

amrgomaaelhady commented 3 weeks ago

Thank you for checking that out and sorry that I couldn't be of much help regarding the RGB Camera. You are definitely right with the depth of field, but I don't have much knowledge about it, however, it seems that you can still reduce this blurriness with both camera position and lights position. Maybe make sure you are positioning the correct camera. You can manipulate the position of existing lights as in the attached screenshot, or add more light sources. image

When doing so and pulling the camera a bit back (and disabling the car object during gameplay), I got something like this, which is a bit better.

image

And, you are perfectly right that the camera.json and the SettingsActor are the only parts that control the cameras. Both CineCameraActor34 and CineCameraActor2 are old assets from previous attempts that are no longer used, you might as well delete them completely as I just did and nothing will be affected (although they are still connecting to other game objects, so you will get a warning upon deletion).

goutamyg commented 3 weeks ago

With the camera pulled backwards, the gesturing gets less blurry; but a blurry/hazy effect is visible as the hand approaches the camera 0086 I am trying to run these RGB images through some monocular depth estimation methods and hence, any distortion in the RGB space affects the predicted depth. Thank you for your time helping me through the issue. If possible, kindly share the [x, y, z] camera coordinates used for the image you shared above.

amrgomaaelhady commented 3 weeks ago

Sure, it it possible, however, this was some random movement to check if it works. The coordinates are (X=229.484085,Y=-67.092163,Z=211.402145). Note that I have also moved the light sources:

image

image