Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Update BlobCounterBase.cs #2198

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Sources/Accord.Imaging/Blob Processing/BlobCounterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ private unsafe void CollectObjectsInfo(UnmanagedImage image)
{
int blobArea = area[j];

Blob blob = new Blob(j, new Rectangle(x1[j], y1[j], x2[j] - x1[j], y2[j] - y1[j]));
Blob blob = new Blob(j, new Rectangle(x1[j], y1[j], x2[j] - x1[j] + 1, y2[j] - y1[j] + 1));
blob.Area = blobArea;
blob.Fullness = (double)blobArea / ((x2[j] - x1[j] + 1) * (y2[j] - y1[j] + 1));
blob.CenterOfGravity = new Accord.Point((float)xc[j] / blobArea, (float)yc[j] / blobArea);
Expand Down