Page 1 of 1

Increase BI5 sensitivity

Posted: Mon Aug 09, 2021 1:22 pm
by Talywain
Hello. I have recently upgraded from an old computer to a new one and from BI4 to BI5. Running BI4 on my old computer it was showing about >90% CPU and about 3FPS. My new one runs about 25% CPU and originally was running about 25FPS but I have turned that down to 10FPS. With my old system BI would trigger on a cat ambling up the lane or a fox running quickly past the house. I imported the camera settings and all seemed to go well. The problem I have is that now BI5 will only trigger on something the size of a car. With one person walking past it picks up the motion but doesn’t trigger, two people sometimes trigger it but it takes a while and only when they are closest to the camera. As the camera is up on the roof it’s about 20 Meters from the lane so all my settings were almost as sensitive as I could make them. I have now set everything I can think of to the to the absolute maximum sensitivity but it still won’t trigger on one person. I even set up a Hotspot on the lane but even this hasn’t helped. Could it be that the much higher frame rate is causing the problem i.e. a much smaller difference between frames?
Assuming I can insert the image correctly, here is a car driving slowly up the lane and it only triggers after the picture even with the make time at 0.2s and it has been detecting the motion for about 3 seconds.
Image

else: https://www.flickr.com/photos/187930245 ... 655366133/

Re: Increase BI5 sensitivity

Posted: Mon Aug 09, 2021 6:56 pm
by MikeBwca
Sounds like your very familiar with BI & motion settings. I'm sure you've tried these, but, I'll mention them.

In 'Motion sensor' settings...

- Enabling 'High Definition' will increase motion detection samples by 4x.
- If your camera supports zoom, zooming in will have the effect of increasing sensitivity as the area will be larger.
- If your camera does not have zoom you could test using 'Area of Interest' on the Video Tab. This has the effect of a digital zoom. Do this on a 'Clone' of the camera, so you retain your original camera image.
- Reducing 'Object size' will help.
- Have you tested enabling 'Black & white'?

Re: Increase BI5 sensitivity

Posted: Tue Aug 10, 2021 1:42 pm
by Talywain
Thanks for replying. Yes, I have those settings set but it’s still helpful to know I’m not missing something obvious. Below is a link to a clip demonstrating my problem. Personally I think BI should have triggered but maybe the developers, in trying to reduce false triggers, has made the latest version less sensitive. I did try reducing the frame rate to see if that made a difference but apparently you can’t change it. Maybe there should be an option for cameras that are close, medium and far to allow for small areas of motion. But there isn’t so maybe it’s time for plan B and with my new computer I have the capacity to spare so it should be OK.

Plan B (simplified)
Get BI to save an image every 0.5 sec.
Have a PowerShell script detect the file, send a command to ImageMagic to convert the jpg to bmp.
Scan the bmp for the yellow pixels that indicate motion. If not found – delete pics.
Get a second image to ensure it’s not a transient.
Send a command to ImageMagic to subtract pic1 from pic2 and produce pic3.bmp (much easier than coding it yourself).
Scan pic3 to check for contiguous areas.
Send a remote trigger command to BI.

This gets me wondering. Does anyone else have any useful BI related PS scripts? I’m quite happy to share mine. For those who aren’t familiar with PowerShell, it’s already preloaded on Windows machines and is similar to Basic but interacts directly with the .Net framework and can be very powerful. I know I have a PS BI script somewhere but can’t find it at the moment, so here is a PS script that takes images from a camera with pan/tilt and moves the camera to keep the motion in the centre of the frame. PS file attached. Damn, it seems you can't attach a text file. So I will try and add it as a post.

Have I found the img tag in Flickr? Maybe, Preview shows a still but will it play the video?
Image

Else
https://www.flickr.com/photos/187930245 ... ateposted/

Re: Increase BI5 sensitivity

Posted: Sun Aug 15, 2021 3:07 pm
by Talywain
I’m about 50% of the way through my project to externally trigger BI on motion and have been reading lots of posts here. I’m well impressed on the information contained within the site, thanks all. Cloned cameras for testing and especially the Testing and Tuning option are new to me, which brings me to my question. I can save a video clip and run it through the Analyze with motion detector option which results in the sensitivity I am looking for but the normal, real time, daylight clips are significantly less sensitive than the Analyze function show (night-time is about the same), which seems wrong to me. I’m wondering if this is a bug or am I missing something? Does Analyze use the same settings as Real Time, even if my settings are as sensitive as I can set? I have the Motion sensor set to the Black and White option so I think daylight sensitivity should be the same as the (monochrome) IR illuminated video, but it isn’t. Any suggestions?

Re: Increase BI5 sensitivity

Posted: Sat Aug 28, 2021 8:26 pm
by Talywain
Hi, I’m looking for information on using the RS232 external trigger for a camera (or two).
What is the difference between DIO and Global DIO?
What camera trigger settings are required for RS232?

Writing some code to identify motion – easy (I’m even considering of adding some code that identifies if the object is taller that wide or smaller and wider than tall (i.e. Person/animal (birds will be a whole different problem, but not impossible if it looks at the legs)). Trying to send an external trigger to Blue Iris is turning out to be beyond me. Initially I was going to send a command over the network but came to the conclusion that I couldn’t send a command to port 81 AND have the webserver running on the same port, which is essential for me as I monitor the program via the webserver. Being able to specify a different port for external triggers would be so nice. And so I decided to go down the RS232 route, despite that feeling ‘oh, so last century’. I wrote a little Powershell script to send the commands so that I could set up BI. I didn’t expect that to be so tricky. BI shows the ‘Current input bits’ in the’ Digital IO and IoT’ tab but something appeared to be wrong. Not only can I not get the camera to trigger but the timing of the BI system seems wrong, when going from bit 1 to bit 0 (bit 2 to bit 0 seems to work as expected, but still doesn’t trigger the camera). I have checked the Powershell script into Putty and it works as expected (2 seconds between bytes – like clockwork). So then I added my other camera so that I could see if that made any difference. The commands are sent every two seconds but for BI to go from byte1 to byte0 is 8 seconds longer than it should be, so I guess there is one bug. Initially I was sending 1 – 0 – 2 – 0, but sending 2 – 0 – 1 -0 highlights the difference.

Below are the settings:

System Digital IO and IoT Tab

Image

DIO Configure run action 1

Image

DIO Configure run action 2

Image

DIO Configure run action 3

Image

Camera Main

Image

Camera Action tab

Image

Here is my test script:
#---------------------------------------
# Serial port test
$port = new-Object System.IO.Ports.SerialPort COM5,9600,None,8,one # COM4-BI COM5-Powershell
$port.Open()
$data = [int]1 # Byte to send to BI
$port.Write([byte[]] ($data), 0, 1)
write-host "1"
Start-Sleep -s 2 #
$data = [int]0 # Byte to send to BI
$port.Write([byte[]] ($data), 0, 1)
write-host "2"
Start-Sleep -s 2 #
$data = [int]2 # Byte to send to BI
$port.Write([byte[]] ($data), 0, 1)
write-host "3"
Start-Sleep -s 2 #
$data = [int]0 # Byte to send to BI
$port.Write([byte[]] ($data), 0, 1)
write-host "4"
Start-Sleep -s 2
write-host "Done"
$port.Close()
#---------------------------------------

Here are the results from running the above: (Damn, the original files from yesterday are gone. But, I am sure I can reproduce them. BI was reporting a connection that seemed to have past the first hurdle. Time to run a virus scan on my new server, just in case. But that process seems to have reset my RamDrive. Why a Ram Drive? I use programs that manipulate images from BI. Its way faster using a Ram Drive than either a SSD or HDD, but gets reset on Reboot. They scan/manipulate the results of a .bmp image that is converted from BI’s .jpg’s. I am using Imagemagick to do the heavy lifting. I can convert a BI .jpg by sending IM a ‘Command Line’ instruction to convert some of it into a .bmp. From there I can either search for the yellow/orange pixels that indicate motion or use IM to create a .bmp file resulting from differences between sequential images (to show contiguous motion or diffence) i.e subtract img2.bmp from img1.bmp and create img3.bmp. I use it for tracking my dogs. They move into an area. Maybe sleep some. Then go somewhere else. All under surveillance (mostly))

Pass A 1 - 0 - 2 - 0
DIO1 Set Action.20210828_204344
DIO1 Clear Action.20210828_204355 (11 seconds)

Pass B 2 - 0 - 1 - 0
DIO2 Set Action.20210828_204424
DIO2 Clear Action.20210828_204427 (3 seconds)
DIO1 Set Action.20210828_204428 (1 second)
DIO1 Clear Action.20210828_204439 (11 seconds)

Pass C Sanity check 2 - 0 - 1 - 0
DIO2 Set Action.20210828_204455
DIO2 Clear Action.20210828_204457 (2 seconds)
DIO1 Set Action.20210828_204459 (2 seconds)
DIO1 Clear Action.20210828_204509 (10 seconds)

Pass D 1 - 0 - 2 - 0
DIO1 Set Action.20210828_204533
DIO1 Clear Action.20210828_204544 (11 seconds)

Re: Increase BI5 sensitivity

Posted: Mon Aug 30, 2021 6:22 pm
by Techie007
Talywain wrote: Mon Aug 09, 2021 1:22 pmHello. I have recently upgraded from an old computer to a new one and from BI4 to BI5. Running BI4 on my old computer it was showing about >90% CPU and about 3FPS. My new one runs about 25% CPU and originally was running about 25FPS but I have turned that down to 10FPS. With my old system BI would trigger on a cat ambling up the lane or a fox running quickly past the house. I imported the camera settings and all seemed to go well. The problem I have is that now BI5 will only trigger on something the size of a car.
Regarding unusually low sensitivity between BI4 and BI5, make sure you're using the Simple motion detection algorithm instead of the new Edge Vector algorithm. The latter is far less sensitive. Also, if you're now using the new camera substream feature, this might be another reason for decreased sensitivity.