Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Halovision/PluginHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public static int GetTossThreshold()
return visionForm.TossThreshold;
}

public static bool DetectREM()
{
return visionForm.DetectREM;
}

public static int GetTossHalfLife()
{
return visionForm.TossHalfLife;
Expand Down Expand Up @@ -548,7 +553,15 @@ public override double Value
int eyeMoveMax = Device.GetEyeMoveMax();
int idleTicks = Device.GetIdleTicks();

history.Add(Device.GetVision());
if (Device.DetectREM())
{
history.Add(Device.GetVision());
}
else
{
history.Add(0);
}

if (history.Count > 768) { history.RemoveAt(0); }

// Check for blinks
Expand Down
4 changes: 2 additions & 2 deletions Halovision/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]
3 changes: 3 additions & 0 deletions Halovision/VisionForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public partial class VisionForm : Form
private VideoCaptureDevice videoSource;
private Rectangle[] faceRegions;
private CascadeClassifier cascadeClassifier;
public bool DetectREM = true;

private bool processing = false;
private Bitmap currentBitmap = null;
Expand Down Expand Up @@ -165,6 +166,7 @@ private void LoadClassifier()
{
try
{
DetectREM = true;
cascadeClassifier = null;
if (cmbClassifier.Text != "" && cmbClassifier.Text != "None")
{
Expand Down Expand Up @@ -650,6 +652,7 @@ private void tmrDiff_Tick(object sender, EventArgs e)
Image<Bgr, byte> imageFrame = new Image<Bgr, Byte>(currentBitmap);
Image<Gray, byte> grayFrame = imageFrame.Convert<Gray, byte>();
faceRegions = cascadeClassifier.DetectMultiScale(grayFrame);
DetectREM = faceRegions != null && faceRegions.Length > 0;
}

Difference(ref previousBitmap, ref currentBitmap, out diff);
Expand Down
8 changes: 4 additions & 4 deletions Installer/Lucid Scribe Halovision.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -28626,15 +28626,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe Halovision"
"ProductCode" = "8:{36D23BBF-F7BC-4F57-9EB2-5590AFDEDAAE}"
"PackageCode" = "8:{A961F9DC-AA06-4903-8974-5A955A416F3E}"
"ProductCode" = "8:{38886B29-6C7F-43C0-B77D-AB74D44D53DC}"
"PackageCode" = "8:{89FDD31B-48F5-4CFD-BA7B-E79BF69FAB0A}"
"UpgradeCode" = "8:{CAAB2187-AD23-435C-A3DB-568744247625}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.3.2"
"ProductVersion" = "8:1.3.3"
"Manufacturer" = "8:lucidcode"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://www.lucidcode.com/Contact"
Expand Down Expand Up @@ -29158,7 +29158,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_395AC690E5F04358B866710FD743FFE4"
{
"SourcePath" = "8:"
"SourcePath" = "8:..\\Halovision\\obj\\x86\\Release\\lucidcode.LucidScribe.Plugin.Halovision.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_491A001224CF4D699EA475B2FB5F2890"
Expand Down