Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller timestamp for newer frame #780

Open
pourfard opened this issue Sep 18, 2024 · 3 comments
Open

Smaller timestamp for newer frame #780

pourfard opened this issue Sep 18, 2024 · 3 comments

Comments

@pourfard
Copy link

pourfard commented Sep 18, 2024

Is it possible to get a frame with smaller timestamp than previous frame? I have a GigE 2 Megapixel camera.

        self.cam.AcquisitionMode.SetValue('Continuous')
        self.cam.Close()
        self.cam.StartGrabbing(pylon.GrabStrategy_LatestImageOnly)

I use above code to start grabbing and here is my code to grab a frame:

def get_frame(self):
        # when there is an exception I try 4 more times to get a successful grab
        for i in range(5):
            with self.cam.RetrieveResult(5000, pylon.TimeoutHandling_ThrowException) as grabResult:
                if grabResult.GrabSucceeded():
                    print(grabResult.GetTimeStamp())
...

while True:
    get_frame()

Sometimes frames not grabbed sequentially and the timestamp of newer frame is smaller than previous frame. Is it possible? If yes how can I solve it? I need ordered frames.

Is your camera operational in Basler pylon viewer on your platform

Yes

Hardware setup & camera model(s) used

PC:

CPU: ARM64
OS: Ubuntu
RAM: 4GB

Runtime information:

python: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
platform: linux/aarch64/5.10.110-rockchip-rk3588
pypylon: 4.0.0 / 8.0.0.10
@thiesmoeller
Copy link
Collaborator

This would only be possible if

  • You are synced to PTP in arbitrary time domain ( not UTC ) and you lost the connection to your grand master clock and the camera found another clock with a smaller time

  • Your code resets the GigEVision time stamp ( active commands )

Please log the blockid too to debug this

@pourfard
Copy link
Author

Thanks for your response,

I have not set any NTP server for the camera. But the host system was syncing with GPS and another NTP server and I disabled GPS now. May it cause the problem? Also I don't reset timestamp using commands.

I sometimes see this error too:

Buffer Incompletely Grabbed: Error 3774873620 GX Status 0xe1000014

Is it related to this problem?

@SMA2016a
Copy link
Collaborator

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants