Bug 3805: Pixel number changes in orthophoto

I frequently use the same bounding box for several orthophotos.
It happens quite often that even though it is exactly the same (imported or not) and I do not alter the size in the plane for the projection, I end up with one pixel more or less in one of the dimensions of the orthophoto (at the same pixel size, of course).
I suspect it is some rounding issue.
Since I need to assemble them in Photoshop, they need to be of exactly the same mesaurements, otherwise it gets inconvenient.
One pixel might not be very much and I can work around it, however it takes quite a bit of effort…

Yep, just confirmed the rounding theorie.
When I select an orthophoto with the “wrong” number, say 3858, and change the pixel size to something else, then back again, it shows the “right” pixel number 3859.
When I then render the ortho, the result is again 3858.
I did not touch the box at all in the whole process!
The problem is that it sometimes stays at 3859 and sometimes not.

Now I had a case where it said 3859 in the orthophoto info, but exported was 3858…

Hello,
do you encounter this issue in RealityCapture Promo 1.0.2.2600?

Hi lubenko,

yes, but it was the same in the older versions…

I wonder why it happens to you just sometimes.
In what format do you export orthographic projections and in what application do you check their dimensions - every time the same format and software?

By the way, isn’t it more convenient to change the width/height rather than ortho pixel size?

I think it is a rounding issue or at least connected to RC calculationg the pixel numbers according to the bounding box.
There are cases where it is never an issue and then others, where I have to check each and every time before I hit Render.

Yes, setting the pixels directly would probably help, although I wonder if there would be cases where the other dimension of the image, which would have to be calculated according to the ratio of the bounding box, would then also show this inconsistency.
It is not an option for me though because I need the resolution to be precise for scaling purposes, they all need to be to a specific scale. And since the bounding box needs to be adjusted to the situation, the pixel size is the only option which is suitable for that.

By accident I just noticed, that when I am turning the bounding box, it can happen that the pixel number flickers erraticly up and down by 1…

I have tried it and sometimes when you rotate a scene and then enter a new width/height in the Ortho Projection Tool panel, the width/height is adjusted ±1 px (compared to the previous numbers), even though you had not touched/changed the reconstruction region (bounding box),
I will report it to our software developers

Thanks for checking on it!

Just a little update:
I now have a case where the difference is 3 pixels !?!

When I define the bounding box and set the pixel size, I can switch around the orange orthophoto face selection on the box as much as I want and it stays the same. Then I rendered one OP and it was fine, the size in the 1D view next to the OP name has the same size. Exporting it also shows the same size.
But when I re-select the orthophoto, the size in the OP creation menu is reduced by 3 Pixels (the height in this case). When I hit render now, the OP will be smaller and also export smaller.
Good luck! :smiley:

Now everything seems to be disintegrating… :shock:

Just for the heck of it I tugged a bit on the bounding box to see if that changes anything.
And it did - now the difference is 30 pixels!!
And the OP that is higher is displayed narrower in RC, that means one of them gets stretched but is still displayed at the intended height somehow.
Even better is that when I open one of the files in Photoshop Elements, I get the weirdest message saying that the file has been created to be displayed on a tv screen (translation from german).
I have never ever had this issue anywhere before and I am using this software since years. Maybe it’s just coinsidence?
In Photoshop, it is as the size indicates, one of them is stretched higher than the other.
I can send you the orthophotos with info files if that would be any help…

OP-shorter.jpg

OP-higher.jpg

jpeg-warning.jpg

Oh, and this time even the pixel size has changed from 0.0002 to 0.000199…

Another little insight.
Just now it happened again, though with the standard one pixel (A).
It always seems to be height.
Then I wanted to experiment again and tugged the upper knob of the box a bit higher so that it has some different relation to go on. I hit render then and weirdly it did the funny stretching again, meaning the OP (B) was supposed to be about 20 pixels higher (I made sure the 0.0002 m per pixel were set properly) but the result was that the OP is displayed at the same hight than the first one (A), only narrower to compensate for the higher number of pixels I assume. The funny thing is that when I select a different OP and then go back (B), the bounding box is not as high as after I tugged it but identical to my first try (A).
My guess is that it has something to do with what is selected at the time of pressing Render - maybe there is some kind of temp data that doesn’t get refreshed or rather that some older data gets selected instead of what I want. That would be supported by the fact that sometimes when I click around (different component and/or model and/or orthophoto), the proper pixel number will be displayed when I select the critical OP (A) but I haven’t been able to figure out the pattern.

Ok, confirmed.
When a “difficult” OP is active and I change to a different model in the same component, it will show the right number of pixels in the OP menu again. Then it will retain the right number for the first OP that I click after switching models, with the next click (on this or another OP with the same size) it will show the wrong number again.

I noticed some change in the behaviour since the last update.
Now, the pixel size will be adjusted to an odd number.
That means the problem is not fixed, only the display is different.

First I create a boundig box and set the pixel size to my specification of 0.002, then hit enter.
After that, the resulting resolution will be displayed: 755x5612.
When I render it, the pixel size will change to 0.002001 in the Ortho Projection Tool, along with the resolution to 755x5610 (screenshot: A).
The ortho itself will show slightly different values: 775x5612 (as specified) and only the “Units per column pixel” (again an inconsistency in terminology as opposed to “Ortho pixel size”) will show 0.002001, whereas “per row” will maintain the specified 0.002 (screenshot: B).
The deviations correlate perfectly: 5610/0.002*5612=0,00200071301247771836007130124777 (rounded up = 0.002001).

I suspect it has something to do with fitting a whole pixel number into the arbitrary size of the bounding box.
Although then the “row units” should also deviate…

Götz Echtenacher wrote:

I noticed some change in the behaviour since the last update…

please specify the build because we are juggling with more of them

1.0.2.2810 Promo

From now on 2935 Promo (but maybe soon 2810 again…)

News about the pixel change:
Adjusting the box in the direction of the view (with the red arrows) also seems to influence the behavior, although it does not make any sense.
I noticed it because I have a difficult model that needs many slices in close proximity.
There was one ortho with the typical one pixel off in y direction in a whole series.
I wanted to re-render it properly, but never mind what I do - if the projection plane is in the same small area (it’s not possible to get it exactly with the mouse), the pixel error occurs.
Only when I change the position of the opposite side of the box, it finally renders with the right pixel number…

how about now?