Patent ID: 8106782

Claim:
A method of detecting an object in a bed, said method comprising capturing, by an optical sensor, a number of consecutive image frames comprising at least a first and a second image frame; determining, by a difference image determinator a difference image by subtracting said first image frame with said second image frame; determining, by a difference pixel determinator, a number of difference pixels in a bed zone of said difference image and a number of difference pixels outside said bed zone; calculating, by a share determinator, a share of difference pixels in said bed zone by calculating a ratio between said number of difference pixels in said bed zone and a number of difference pixels outside said bed zone; determining, by an in-bed determinator, if said object is present in said bed by determining if said share is larger than a reference share; and transmitting, by a transmitter, a signal indicating that said object is present in said bed if said object is determined to be present in said bed.