basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
575 stars 208 forks source link

Smaller timestamp for newer frame #780

Open pourfard opened 2 months ago

pourfard commented 2 months ago

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 commented 2 months ago

This would only be possible if

Please log the blockid too to debug this

pourfard commented 2 months ago

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 commented 2 months ago

No