ML-Purdue / Document-Reconstruction

Purdue University SIGART document reconstruction project.
1 stars 0 forks source link

Background subtraction: processing and output #5

Closed chrismwendt closed 10 years ago

chrismwendt commented 10 years ago

Spawn a thread to do processing when the user hits enter. The processing will update the displayed image, while leaving the original.

Steps:

  1. Convert the background and foreground colors into 3D points
  2. Build the convex hulls for the sample background and foreground points
  3. Set the alpha and color of each pixel in the image based on the diagram below

1371686_10201454198455614_1879512219_n

Alpha values are set to b/(a+b) where a and b are the distances to the nearest points in or on the foreground and background convex hulls, respectively. Colors are set to the color of the nearest point inside the foreground convex hull.

chrismwendt commented 10 years ago

Most of this has been completed. What isn't done yet is the checking of edges and faces to determine the nearest point in a convex hull.

chrismwendt commented 10 years ago

Completed in commit 9ae523012d920ffbdb793044ffb51df8c4f1561d.

See the improvement (notice the nearest vertex solution looks too harsh):

algorithm_comparison