supplierdeeply

CCTV camera trap

  • 5 Replies
  • 528 Views
CCTV camera trap
« on: 19 / November / 2017, 11:20:08 »
Advertisements
I've used several  CCTV box cameras in the mid price range and nothing compares with still compressed jpeg images you can get from a Canon Powershot over 6Mpix. Part of the problem is the high data payloads, image processsing and high compresssion needed to stream and store movie streams. But go and look at an individual frame and picture quality is very poor unless you are viewing small on a hand held device. Come the time you need to closely examine a recording, you realize there is very little useful detail. So it is that combined with these poor quality cameras I decided just 3 or 4 still shots triggered from an alarm event (IR) would be far more useful.

For this application I am using an IR detector module for motion sensing because this doesn't require any ambient light for movement trigger and it seems more reliable when leaves are falling off trees. I've solved issues of  external powering and remote shutter using CHDK. However, the one thing stopping me from a near perfect solution without buying a GoPro is a need for continuous still shot recording overwriting old shots when the memory card is full.

Using a 32Gb SDHC card I can store a lot of interval shots, but would have to check card capacity remaining and swap it at irregular intervals.

I suspect limitations of CHDK are at this fundamental Canon firmware level where most camera users will never want shots over written? But I'll ask the question: Are there any script controls that could offer continuous shot recording?

*

Offline reyalp

  • ******
  • 11514
Re: CCTV camera trap
« Reply #1 on: 19 / November / 2017, 15:28:06 »
I suspect limitations of CHDK are at this fundamental Canon firmware level where most camera users will never want shots over written? But I'll ask the question: Are there any script controls that could offer continuous shot recording?
You can easily delete files from a Lua script in chdk, using os.remove. Directories must be empty before you can delete them. You can use the CHDK specific functions os.idir or os.listdir to list files and directories.

There are some quirks to be aware of
* On many cameras, if you delete image files while in record mode, the camera will crash when you switch back to play or power off the camera. If your camera is affected by this, you can get around it by switching to playback mode before deleting.
* The camera may keep some data in RAM associated with each shot, so it's possible if you shoot many thousands of shots without restarting, it will run out of memory.
* There are likely also issues if the camera runs continuously for more than a couple weeks without restarting
Don't forget what the H stands for.

Re: CCTV camera trap
« Reply #2 on: 19 / November / 2017, 15:31:27 »
The ultimate intervalometer will optionally automatically delete the oldest images if your SD card is full.  You could lift the code from there?

There is also some code available for a commercial security camera application that sells as a residential street lamp.  A little searching on this forum should find it.

Edit :  found it - Spy Lantern Surveillance Camera
« Last Edit: 19 / November / 2017, 16:18:08 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CCTV camera trap
« Reply #3 on: 20 / November / 2017, 06:50:20 »
Thanks for the ideas and links I will look at. I can work around the internal memory limitation with my external controller by rebooting the camera from a timer every so often. I presume memory is used for the FAT file table as more files are added to the card, which might explain why new folders are created as the card fills. Switching from shoot mode to file preview in order to delete the oldest files will be a problem as the camera is considered remote fit and forget.

I'm still thinking it through but I might also consider doing the control with hard wiring to its switches. Either adding a mini connector, or seeing if I can do away with the usb functions and use the connector re-wired to the buttons. But nothing seems to solve the problem of circular recording whilst the camera is operational in shoot mode. Thanks for the links which also mention camera over heating. I'll do some tests on current draw but I'm already reducing the display time.

I've got CHDK installed on a Canon A650IS and on 2 A560s. The power on button for the A650IS works as normal opening the lens, running the CHDK script and starting in shoot mode, but power on on the A560s puts the camera into preview and a second button press is need for shooting. This is what the wiki says and I'm puzzled as to why the A650IS goes straight into shoot mode? For my remote camera trap I would rather have the A560s go into power on ready to shoot since I will be using an external power supply which might suffer a power outage. I suppose I can't win everything!

Thanks for replies.


*

Offline reyalp

  • ******
  • 11514
Re: CCTV camera trap
« Reply #4 on: 20 / November / 2017, 16:33:14 »
Thanks for the ideas and links I will look at. I can work around the internal memory limitation with my external controller by rebooting the camera from a timer every so often.
Note that you should make sure the camera is shutdown gracefully, either using the power switch or form script. For script, I sugggest using post_levent_to_ui("PressPowerButton")

To power on after power is removed, you also need to trigger the power switch. A common approach to this is to hold it down continuously. This mostly does not interfere with normal operation of the camera.

Alternatively, you could hack out the switch and control it from a microcontroller or something like that.

Quote
Switching from shoot mode to file preview in order to delete the oldest files will be a problem as the camera is considered remote fit and forget.
Old cameras like the ones you are using probably suffer from the crash when files are deleted in record mode. Try it and see...

In any case, script can switch between modes using set_record()
Quote
I've got CHDK installed on a Canon A650IS and on 2 A560s. The power on button for the A650IS works as normal opening the lens, running the CHDK script and starting in shoot mode, but power on on the A560s puts the camera into preview and a second button press is need for shooting. This is what the wiki says and I'm puzzled as to why the A650IS goes straight into shoot mode?
Old cameras like A650IS with separate physical switch for playback/record start in whatever state it's set too.

Quote
For my remote camera trap I would rather have the A560s go into power on ready to shoot since I will be using an external power supply which might suffer a power outage. I suppose I can't win everything!
Again, you can use an autostart script to switch.
Don't forget what the H stands for.

Re: CCTV camera trap
« Reply #5 on: 20 / November / 2017, 16:46:34 »
Thanks for the ideas and links I will look at. I can work around the internal memory limitation with my external controller by rebooting the camera from a timer every so often.
Note that you should make sure the camera is shutdown gracefully, either using the power switch or from script. For script, I sugggest using post_levent_to_ui("PressPowerButton")
Or you could simply call the  reboot( ) function periodically in your script (assuming you have the script setup to autostart).  Which is what the ultimate.lua script does.  ;)
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics