sceneImg from second sensor is black (even after calibration)

Hi All,

I hade an issue of black sceneImg that i was thinking solved, but after did calibration im still getting black image.
I know the calibration is ok, cause if i give identity matrix as calibration for both sensoes im getting a mesh with 2 faces. after usung the calibration matrix i got from the calibration process im geting a good mesh (one face) but the second sensor sceneImg is still black.
(if im using color image every thing is ok)

Please advice

The code:
for (int i = 0; i < m_sensor.size(); ++i)
{
if (!ok[i])
continue;

// Get image size
int cw = m_colorImg[i]->width();
int ch = m_colorImg[i]->height();
int dw = m_depthImg[i]->width();
int dh = m_depthImg[i]->height();

if (m_reconstruct && m_rec)
{
	// Add frame to reconstruction
	bool status;
	bool ret = m_rec->addFrame(i, *m_depthImg[i], *m_colorImg[i], &status, m_sceneImg[i], 0,&m_sensorT[i]);
	if (ret && status)
	{
		LOG_INFO("ProcessFrames - status & ret ok ", "sensor", i);
		string path = "c:/POC/check/frame_" + to_string(i) + "_" + to_string(index) + ".png";
		PngIO::writeImage(path.c_str(), m_sceneImg[i]->data(), m_sceneImg[i]->width(), m_sceneImg[i]->height(), 4, 0); // got black image for sensor 1 (i==1)
       //PngIO::writeImage(path.c_str(), m_colorImg[i]->data(), m_colorImg[i]->width(), m_colorImg[i]->height(), 3, 0); // working good for both sensor

                }

One reason the sceneImg can be all black is that the virtual camera used for rendering the scene does not have a valid pose associated with it. This can happen when the tracking fails.
How are the two cameras you are using positioned relative to each other? Do they have some overlap? If there is no or very little overlap between the cameras this can lead to tracking failure.
Does the multi view reconstruction sample from the SDK work for your setup and scene?

Thanks for your answer.
There is overlap between the sensors, in addition the tracking is ok (look at the code, only when status is true produce scene image but its result is black).

The SDK example does not work cause of the configuration, i attached the screen shot.

Thanks for your help

In addition i notice that the scene image from the sensor that produce good images (not black) has the result of the 2 sensor combined.

Currently internally the scene image gets generated only for the sensor 0. That’s why it is black for all the other sensors.

Just to clarify, the scene image is the whole reconstruction (from all cameras) seen from the view of the first camera. That’s why you see 2 faces for the uncalibrated case.

1 Like