palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Sun Sep 16, 2018 4:54 pm

The rotation problem was solved after rotating the camera preview port in addition to the video port. Interesting why when there is difference for resolution and rotation between the video and preview port the tunnels stall ...

That was the last issue, the next task is to measure the speed improvement and wonder how the splitter will work when configure to take several 8MP frames and encode them to jpeg:
  • will queue the sequential frames and will encode them slowly at background?
  • will take and encode single frame dropping any other incoming frames then will take the last/next frame at that moment and will encode it and so on?
i.e. will it drop frames or not ...

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Tue Sep 25, 2018 1:24 pm

Guys, we got strange results in two sequential frames - seems like some artifacts remains on small parts on the frame. Do you have idea what it could be the reason or how to avoid it?

It is impossible to attache the large jpeg files here so please use that link: https://we.tl/t-FxCBV1EwAP

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Mon Oct 08, 2018 9:56 am

Guys, will someone from RPi staff react on this?

We were told to use the forum for support but how we can get it if you don't reply for a month?!
Is there anyone else we can talk to to get a reply about this? Maybe the company that we purchase the RPi products from?

dickon
Posts: 233
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: How to tunnel camera to video splitter to image encode?

Mon Oct 08, 2018 10:28 am

It's been less than a fortnight, and your example URL is a 404...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to tunnel camera to video splitter to image encode?

Mon Oct 08, 2018 1:21 pm

I'm paid as a developer, not as forum support, therefore threads sometimes get missed.

Your WeTransfer link has expired. Was it two files called 88_1.jpg and 88_2.jpg? I did download those from some forum post for investigation so it may be those.
If it is then that is a very strange effect cross-hatch effect in 88_1.jpg, and even stranger is that it has a small portion at the top middle(ish) that appears to be correctly processed. It doesn't appear to be the characteristic corruption you get with errors on the CSI2 bus.

How frequently does this happen? Can you replicate it on many boards or only one? You've obviously got a transpose going on as the image is 2464x3280. Any other odd parameters? Sharing the code is the quickest way for me to investigate.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Tue Oct 09, 2018 8:20 am

6by9 wrote: I'm paid as a developer, not as forum support, therefore threads sometimes get missed.
We got that - the confusion comes because all our attempts to get support trough the sales channel were redirected to this forum and you were really helpful to solve everything that we stuck with :)

About the issue:

It happen on tens of boards at the same time - seems related to rapid light intensity change between two frames.
Sometimes changing some camera settings could trigger too - will check exactly which were.
Sometimes the wrong area is a bit smaller or bit bigger - will try to collect as much as possible samples for investigation.

The transpose is just a simple 90 degrees rotation done at the camera component.

I'll start preparing code sample that triggers the problem ...

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Tue Oct 09, 2018 3:36 pm

6by9 wrote:
Mon Oct 08, 2018 1:21 pm
...
Was it two files called 88_1.jpg and 88_2.jpg? I did download those from some forum post for investigation so it may be those.
If it is then that is a very strange effect cross-hatch effect in 88_1.jpg, and even stranger is that it has a small portion at the top middle(ish) that appears to be correctly processed. It doesn't appear to be the characteristic corruption you get with errors on the CSI2 bus.

How frequently does this happen? Can you replicate it on many boards or only one? You've obviously got a transpose going on as the image is 2464x3280. Any other odd parameters? Sharing the code is the quickest way for me to investigate.
Yes, these were the corrupted files. That srange cross-hatch effect is intentional - we are shooting two sequential frames - the first one is with this very intense projected hatch pattern, the second frame is without the projection (we are very precisely controlling the light to have it just in during the first frame)

So as you can see from the two images on the first one there is one area that is taken probably from the previous/next frame without the projections i.e. the clean part is the wrong one not the right as you assume. This is a problem for us because messes with the entire postprocessing pipeline that depends on the projected hatch.

During some experiments with the camera settings we note that setting DRC != OFF causes the same effect even without projection. Don't know if this is the cause because we were keeping DRC to OFF all the time but visually seems similar.

The strange thing is that there were no visual artifact like that when we were using still shots, everything start after switching to video frames.
BTW - do you plan to release the fixed start_x.elf soon to the official firmware?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to tunnel camera to video splitter to image encode?

Tue Oct 09, 2018 6:32 pm

palavrov wrote:
Tue Oct 09, 2018 3:36 pm
Yes, these were the corrupted files. That srange cross-hatch effect is intentional - we are shooting two sequential frames - the first one is with this very intense projected hatch pattern, the second frame is without the projection (we are very precisely controlling the light to have it just in during the first frame)
Where have you stated that previously?
You ask for assistance and then omit crucial details, therefore meaning I waste time trying to formulate a logical explanation for the image processing to manage to create that effect assuming that the "normal" section of the image is the expected output rather than the issue.
palavrov wrote:So as you can see from the two images on the first one there is one area that is taken probably from the previous/next frame without the projections i.e. the clean part is the wrong one not the right as you assume. This is a problem for us because messes with the entire postprocessing pipeline that depends on the projected hatch.

During some experiments with the camera settings we note that setting DRC != OFF causes the same effect even without projection. Don't know if this is the cause because we were keeping DRC to OFF all the time but visually seems similar.

The strange thing is that there were no visual artifact like that when we were using still shots, everything start after switching to video frames.
I have a strong hunch that the issue is going to be related to the transpose you appear to be requesting (deduced from the image resolution being 2462x3280 and previous comments).
However I'm not prepared to waste my time trying to recreate your situation that is currently so loosely defined. As and when you provide a test case that exhibits the issue then I will take a look.
palavrov wrote:BTW - do you plan to release the fixed start_x.elf soon to the official firmware?
It's released via rpi-update. https://github.com/Hexxeh/rpi-firmware/ ... 446d1a36bf
It'll make it into the Raspbian repo whenever they do their next firmware bump.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Wed Oct 10, 2018 10:06 am

Please excuse me for the misunderstanding. I'm into the problem and from my side it seems obvious what's wrong i.e. I was expecting that will got questions if something is not clear. It is understandable that you don't want to waste your time to recreate the issue, I was just hoping that may be it is something common that will trigger your memory and will say me - yes, you need to change this or that parameter and it will be OK.

Let see if can reproduce the issue with the test project so you can investigate after ... if the rotation is the cause it is possible to move that step later in our pipeline i.e. to rotate the images at the server not at the RPi.

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Wed Oct 10, 2018 3:02 pm

The issue is easily reproducible. I updated the same test repo ( https://github.com/palavrov/camera-app ) - you just need to make sure that the two frames differ - I was shaking the camera during the test ...

1.jpg https://pasteboard.co/HHOLOkn.jpg
2.jpg https://pasteboard.co/HHOMzHr.jpg

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to tunnel camera to video splitter to image encode?

Wed Oct 10, 2018 4:12 pm

Something very strange, but definitely related to the transpose.
Initial testing using an OV5647 showed no issue. IMX219 seems more prone to it.
I'm not convinced that the frame that it is inserting is the first frame - the alignment doesn't match for the images I've seen. Capturing 4 buffers it seems to only be the 2nd frame that gets hit. Most curious.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

palavrov
Posts: 33
Joined: Wed Jul 11, 2018 12:11 pm

Re: How to tunnel camera to video splitter to image encode?

Wed Oct 10, 2018 7:32 pm

I've tested without rotation and the issue disappear - so we've workaround. But indeed it is very strange - rectangular artifact, various dimensions, not noise, sometimes looks like it is from another frame, sometimes looks like it is from another part of the same frame.

I was thinking to test with more frames too and now you confirm that it could help which is another workaround - to skip first two frames and to take the next two.

Having two workarounds is more than OK but will be really curious why it happen - definitely not a random mess.

Return to “OpenMAX”

Who is online

Users browsing this forum: No registered users and 4 guests