METHOD FOR REAL TIME WHITEBOARD EXTRACTION WITH FULL FOREGROUND IDENTIFICATION
20220232145 · 2022-07-21
Assignee
Inventors
Cpc classification
H04N7/04
ELECTRICITY
G06V10/26
PHYSICS
International classification
G06T7/187
PHYSICS
Abstract
A method to extract static user content on a marker board is disclosed. The method includes generating a sequence of samples from a video stream comprising a series of images of the marker board, generating at least one center of mass (COM) of estimated foreground content of each sample in the sequence of samples, detecting, based on a predetermined criterion, a stabilized change of the at least one COM in the sequence of samples, wherein the stabilized change of the at least one COM identifies, in the sequence of samples, a stable sample with new content, generating, in response to the stabilized change of the at least one COM and from the stable sample with new content, a mask of full foreground content, and extracting, based at least on the mask of full foreground content, a portion of the static user content from the video stream.
Claims
1. A method to extract static user content on a marker board, the method comprising: generating a sequence of samples from a video stream comprising a series of images of the marker board; generating at least one center of mass (COM) of estimated foreground content of each sample in the sequence of samples; detecting, based on a predetermined criterion, a stabilized change of the at least one COM in the sequence of samples, wherein the stabilized change of the at least one COM identifies, in the sequence of samples, a stable sample with new content; generating, in response to the stabilized change of the at least one COM and from the stable sample with new content, a mask of full foreground content; and extracting, based at least on the mask of full foreground content, a portion of the static user content from the video stream.
2. The method of claim 1, wherein generating the sequence of samples comprises: dividing the series of images into a plurality of consecutive portions; and generating said each sample by at least averaging a corresponding consecutive portion of the plurality of consecutive portions.
3. The method of claim 1, wherein generating the at least one COM of the estimated foreground content comprises: applying an adaptive thresholding algorithm to said each sample to generate an adaptive mask, wherein the estimated foreground content comprises the adaptive mask; dividing said each sample into a plurality of tiles; and generating a COM of a tile of the plurality of tiles based on the adaptive mask, wherein the at least one COM of the estimated foreground content comprises the COM of the tile, and wherein detecting the stabilized change of the at least one COM comprises monitoring an amount of change of the COM of the tile over a stability window.
4. The method of claim 3, wherein generating the mask of the full foreground comprises: generating, by at least applying a flood fill algorithm to the estimated foreground content, a starting background; generating, by at least applying a bitwise-and operation to an inversion of the starting background and an invresion of the estimated foreground content, a candidate holes mask; iteratively adjusting, based on one or more connected components in the candidate holes mask, the starting background to generate an ending background; and inverting the ending background to generate the mask of the full foreground content.
5. The method of claim 4, wherein generating the full foreground further comprises: identifying connected component pixels in said each sample that correspond to the one or more connected component in the candidate holes mask; and comparing pixel intensities of the connected component pixels to an average pixel intensity of neighboring pixels of the connected component pixels to generate a comparison result, wherein iteratively excluding the one or more connected component from the starting background is based at least on the comparison result.
6. The method of claim 3, further comprising: generating the static user content by aggregating the portion of the static user content over the plurality of tiles; and sending the static user content to a collaborating user.
7. The method of claim 1, wherein the video stream is a live video stream of a collaboration session, and wherein the static user content is sent to a collaborating user in real-time with respect to the live video stream.
8. A system for extracting static user content on a marker board, the system comprising: a memory; and a computer processor connected to the memory and that: generates a sequence of samples from a video stream comprising a series of images of the marker board; generates at least one center of mass (COM) of estimated foreground content of each sample in the sequence of samples; detects, based on a predetermined criterion, a stabilized change of the at least one COM in the sequence of samples, wherein the stabilized change of the at least one COM identifies in the sequence of samples a stable sample with new content; generates, in response to the stabilized change of the at least one COM and from the stable sample with new content, a mask of full foreground content; and extracts, based at least on the mask of full foreground content, a portion of the static user content from the video stream.
9. The system of claim 8, wherein generating the sequence of samples comprises: dividing the series of images into a plurality of consecutive portions; and generating said each sample by at least averaging a corresponding consecutive portion of the plurality of consecutive portions.
10. The system of claim 8, wherein generating the at least one COM of the estimated foreground content comprises: applying an adaptive thresholding algorithm to said each sample to generate an adaptive mask, wherein the estimated foreground content comprises the adaptive mask; dividing said each sample into a plurality of tiles; and generating a COM of a tile of the plurality of tiles based on the adaptive mask, wherein the at least one COM of the estimated foreground content comprises the COM of the tile, and wherein detecting the stabilized change of the at least one COM comprises monitoring an amount of change of the COM of the tile over a stability window.
11. The system of claim 10, wherein generating the mask of the full foreground comprises: generating, by at least applying a flood fill algorithm to the estimated foreground content, a starting background; generating, by at least applying a bitwise-and operation to an inversion of the starting background and an inversion of the estimated foreground content, a candidate holes mask; iteratively adjusting, based on one or more connected components in the candidate holes mask, the starting background to generate an ending background; and inverting the ending background to generate the mask of the full foreground content.
12. The system of claim 11, wherein generating the full foreground further comprises: identifying connected component pixels in said each sample that correspond to the one or more connected component in the candidate holes mask; and comparing pixel intensities of the connected component pixels to an average pixel intensity of neighboring pixels of the connected component pixels to generate a comparison result, wherein iteratively excluding the one or more connected component from the starting background is based at least on the comparison result.
13. The system of claim 10, where the computer processor further: generates the static user content by aggregating the portion of the static user content over the plurality of tiles; and sends the static user content to a collaborating user.
14. The system of claim 8, wherein the video stream is a live video stream of a collaboration session, and wherein the static user content is sent to a collaborating user in real-time with respect to the live video stream.
15. A non-transitory computer readable medium (CRM) storing instructions for extracting static user content on a marker board, wherein the computer readable program code, when executed by a computer, comprises functionality for: generating a sequence of samples from a video stream comprising a series of images of the marker board; generating at least one center of mass (COM) of estimated foreground content of each sample in the sequence of samples; detecting, based on a predetermined criterion, a stabilized change of the at least one COM in the sequence of samples, wherein the stabilized change of the at least one COM identifies in the sequence of samples a stable sample with new content; generating, in response to the stabilized change of the at least one COM and from the stable sample with new content, a mask of full foreground content; and extracting, based at least on the mask of full foreground content, a portion of the static user content from the video stream.
16. The non-transitory CRM of claim 15, wherein generating the sequence of samples comprises: dividing the series of images into a plurality of consecutive portions; and generating said each sample by at least averaging a corresponding consecutive portion of the plurality of consecutive portions.
17. The non-transitory CRM of claim 15, wherein generating the at least one COM of the estimated foreground content comprises: applying an adaptive thresholding algorithm to said each sample to generate an adaptive mask, wherein the estimated foreground content comprises the adaptive mask; dividing said each sample into a plurality of tiles; and generating a COM of a tile of the plurality of tiles based on the adaptive mask, wherein the at least one COM of the estimated foreground content comprises the COM of the tile, and wherein detecting the stabilized change of the at least one COM comprises monitoring an amount of change of the COM of the tile over a stability window.
18. The non-transitory CRM of claim 17, wherein generating the mask of the full foreground comprises: generating, by at least applying a flood fill algorithm to the estimated foreground content, a starting background; generating, by at least applying a bitwise-and operation to an inversion of the starting background and an inversion of the estimated foreground content, a candidate holes mask; iteratively adjusting, based on one or more connected components in the candidate holes mask, the starting background to generate an ending background; and inverting the ending background to generate the mask of the full foreground content.
19. The non-transitory CRM of claim 18, wherein generating the full foreground further comprises: identifying connected component pixels in said each sample that correspond to the one or more connected component in the candidate holes mask; and comparing pixel intensities of the connected component pixels to an average pixel intensity of neighboring pixels of the connected component pixels to generate a comparison result, wherein iteratively excluding the one or more connected component from the starting background is based at least on the comparison result.
20. The non-transitory CRM of claim 17, the computer readable program code, when executed by the computer, further comprising functionality for: generating the static user content by aggregating the portion of the static user content over the plurality of tiles; and sending the static user content to a collaborating user, wherein the video stream is a live video stream of a collaboration session, and wherein the static user content is sent to a collaborating user in real-time with respect to the live video stream.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0006]
[0007]
[0008]
[0009]
DETAILED DESCRIPTION
[0010] Specific embodiments of the invention will now be described in detail with reference to the accompanying figures. Like elements in the various figures are denoted by like reference numerals for consistency.
[0011] In the following detailed description of embodiments of the invention, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to one of ordinary skill in the art that the invention may be practiced without these specific details. In other instances, well-known features have not been described in detail to avoid unnecessarily complicating the description.
[0012] In general, embodiments of the invention provide a method, non-transitory computer readable medium, and system for extracting written content and/or user placed object(s) from a marker board using a live video stream or pre-recorded video where one or more users are interacting with the marker board. In a collaboration session between collaborating users, the extracted user content is sent to the collaborating user in real time while one or more users are writing/drawing/placing object(s) on the marker board. One or more embodiments of the invention minimize the amount of extraction updates sent to collaborating users by limiting the extraction updates to occur only when content changes in a specific region of the marker board.
[0013]
[0014] In one or more embodiments of the invention, the buffer (101) is configured to store a marker board image (102). The marker board image (102) is an image of a writing surface of a marker board captured using one or more camera devices (e.g., a video camera, a webcam, etc.). In particular, the marker board image (102) may be one image in a series of images in a video stream (102a) of the captured marker board, and may be of any size and in any image format (e.g., BMP, JPEG, TIFF, PNG, etc.).
[0015] The marker board is a whiteboard, blackboard, or other similar type of writing material. The writing surface is the surface of the marker board where a user writes, draws, or otherwise adds marks and/or notations. The user may also place physical objects on the writing surface. Throughout this disclosure, the terms “marker board” and “the writing surface of the marker board” may be used interchangeably depending on context.
[0016] The marker board image (102) may include content that is written and/or drawn on the writing surface by one or more users. Once written and/or drawn on the writing surface, the content stays unchanged until the content is removed (e.g., the content is erased by a user). In one or more embodiments, the written and/or drawn content is referred to as user written content. Additionally, the marker board image (102) may include content corresponding to object(s) placed on the marker board, a user's motion in front of the marker board, and/or sensor noise generated by the camera device. The user's written content and content resulting from user placed object(s), and user's motion, and/or sensor noise collectively form a foreground content of the marker board image (102). The user's written content and content resulting from the user placed object(s) are collectively referred to as static user content of the marker board image (102).
[0017] In one or more embodiments, the buffer (101) is further configured to store the intermediate and final results of the system (100) that are directly or indirectly derived from the marker board image (102) and the video stream (102a). The intermediate and final results include at least an averaged sample (103), an estimated foreground content (104), a center of mass (COM) (105), a full foreground content mask (106), a changing status (107), and the static user content (108). Each of these intermediate and final results is described below in detail.
[0018] In one or more embodiments, the averaged sample (103) is an average of a contiguous portion of the video stream (102a), where the contiguous portion corresponds to a short time period (e.g., 0.25 seconds) during the collaboration session. The averaged sample (103) is one averaged sample within a sequence of averaged samples. Each pixel of the averaged sample (103) is assigned an averaged pixel value of corresponding pixels in all images within the contiguous portion of the video stream (102a). For example, the marker board image (102) may be one of the images in the contiguous portion of the video stream (102a).
[0019] Furthermore, the averaged sample (103) includes multiple divided regions of the marker board. Each region is referred to as a tile and may be represented as a rectangle, square, or any other planar shape. In this disclosure, the term “tile” is also used to refer to an image of the tile.
[0020] In one or more embodiments, the estimated foreground content (104) is a binary mask generated using the averaged sample (103). Each pixel of the estimated foreground content (104) is assigned a binary value that estimates the pixel as either the foreground pixel or the background pixel of the averaged sample (103). In one or more embodiments, the estimated foreground content (104) is generated by applying an adaptive thresholding algorithm to the averaged sample (103). Due to the adaptive thresholding algorithm, the edges or outlines of foreground objects are emphasized in the estimated foreground content (104) and the interior region of the foreground objects are de-emphasized in the estimated foreground content (104). As will be described below, the estimated foreground content (104) is used to detect changes in the foreground content of the marker board image (102) and when the changes become stabilized. Therefore, de-emphasizing the interior region of the foreground objects in the estimated foreground content (104) advantageously does not cause any adverse effects to occur on the overall processing.
[0021] In one or more embodiments, the COM (105) is a pixel location in a tile where the coordinates are averaged from all estimated foreground pixels in the estimated foreground (104). As the user writes/draws or places object(s) into a particular tile, the COM (105) changes due to the user's hand motion and/or due to the added static user content (108).
[0022] In one or more embodiments, the full foreground content mask (106) is a binary mask where each pixel is assigned a binary value that designates the pixel as either the foreground pixel or the background pixel of the averaged sample (103).
[0023] In one or more embodiments, the changing status (107) is a status of an averaged sample (103) indicating whether a significant change in the COM (105) has stabilized over a stability window, which is a predetermined number (e.g., 2, 10, etc.) of subsequent averaged samples (103). A significant change in the COM (105) that has stabilized over the stability window is referred to as a stabilized change. In one or more embodiments, the changing status (107) includes STABLE, CHANGING, STABILIZING, and STABLE WITH NEW CONTENT. STABLE indicates that there are no significant changes in the COM (105) from one averaged sample (103) to the subsequent averaged sample (103). CHANGING indicates that there is a significant change in the COM (105) from one averaged sample (103) to the subsequent averaged sample (103). STABILIZING occurs after a CHANGING state so long as the COM (105) no longer significantly changes over the stability window. If at the end of the stability window the COM has significantly moved from its location prior to entering the CHANGING state, then it is deemed STABLE_WITH_NEW_CONTENT otherwise returns back to STABLE. A STABLE_WITH_NEW_CONTENT state indicates that there is new user content that should be shared with remote participants.
[0024] In one or more embodiments of the invention, the analysis engine (109) is configured to generate a sequence of averaged samples (including the averaged sample (103)) and corresponding estimated foreground content (including the estimated foreground content (104)) from the video stream (102a). The analysis engine (109) is further configured to generate the COM (105) for each tile of the samples.
[0025] In one or more embodiments of the invention, the extraction engine (110) is configured to detect a stabilized change of the COM (105) in the sequence of samples, to generate the full foreground content mask (106), and to extract the static user content (108) in a corresponding tile of the video stream (102a) where the stabilized change is detected. As the user writes/draws and/or places object(s) across the entire writing surface of the marker board, the static user content (108) in the extracted tile of the video stream (102a) represents only a portion of the entire static user content (108) across the marker board.
[0026] In one or more embodiments of the invention, the collaboration engine (111) is configured to generate the static user content (108) by aggregating all portions of the static user content (108) in all of the tiles of the video stream. The collaboration engine (111) is further configured to send an entirety or a portion of the static user content (108) to one or more collaborating users. The act of sending only a portion or the entirety of the static user content (108) to collaborating user(s) is referred to as an extraction update of the collaboration session.
[0027] In one or more embodiments, the analysis engine (109), the extraction engine (110), and the collaboration engine (111) perform the functions described above using the method described in reference to
[0028] Although the system (100) is shown as having four components (101, 109, 110, 111), in one or more embodiments of the invention, the system (100) may have more or fewer components. Furthermore, the functions of each component described above may be split across components. Further still, each component (101, 109, 110, 111) may be utilized multiple times to carry out an iterative operation.
[0029]
[0030] Referring to
[0031] In one or more embodiments, the series of images is divided into consecutive portions where each portion is contiguous and includes consecutive images in the video stream. In one example, the consecutive portions may all have the same number of consecutive images. In another example, the number of consecutive images may vary from one portion to another. Regardless of whether the number of consecutive images is constant or variable, the consecutive images in each portion are averaged to generate a corresponding sample. In one or more embodiments, each sample is scaled down in pixel resolution to improve processing performance in the subsequent steps. Each sample is converted into a binarized sample using an adaptive thresholding algorithm where the two binary pixel values are used to identify an estimated foreground content of the sample. For example, each ON pixel (i.e., a pixel having a pixel value of “1”) in the estimated foreground content represents a portion of the foreground content of the sample. Using the adaptive thresholding algorithm, the edges or outlines of foreground objects are emphasized in the estimated foreground content and the interior region of the foreground objects are de-emphasized in the estimated foreground content. As will be described below, the estimated foreground content is used to detect changes in the foreground content and to detect when the changes have stabilized. Therefore, de-emphasizing the interior region of the foreground objects advantageously does not cause any adverse effect to occur on the overall processing.
[0032] In one or more embodiments, the image frame in the video stream is divided into a number of tiles. In one example, the image frame may be divided equally into rectangular shaped (or other planar shaped) tiles. Each tile in the image frame corresponds to a rectangular section of the marker board, and each rectangular section of the marker board is referred to as a tile of the marker board. In another example, the tiles may have different form factors within the image frame and across the marker board where a dimension of a tile is at least twice the width of writing/drawing strokes in the image.
[0033] In Step 201, as discussed above in reference to
[0034] In Step 202, as discussed above in reference to
[0035] In Step 203, as discussed above in reference to
[0036] In Step 204, as discussed above in reference to
[0037] In Step 205, as discussed above in reference to
[0038] An example of the method flowchart is described in TABLEs 1-5 and
TABLE-US-00001 TABLE 1 1. An empty list of recent_records is built. The recent_records list records a set of recently processed data, whereby each record specifically records: 1.1. The sample_num, which is a sequential counter of samples. One or more frames in the video stream are averaged together into a single sample. Processing occurs on a sample-by-sample basis. 1.2. The sample_orig, which is an image and records the result of individual frames being averaged together. 1.3. The sample_down, which is a scaled down version of sample_orig. 1.4. The msk_adaptive, which is a mask and records the results of running an adaptive thresholding operation on sample_down. 1.5. The msk_canny, which is a mask and records the results of running an edge detection operation on sample_down. 2. Initialize two images, update_img and update_fg to empty images with dimensions equal to the dimensions of the frames in the video stream. These images record the current state of stable image content and identified foreground, respectively. 3. Identify a scale_factor, which is used to downscale the frames if they are too large. This can be set by the user or determined automatically based on hardware characteristics and the dimensions of the frames in the video stream. Some processing occurs on the scaled down version of input as a performance optimization. 4. Generate a tile_grid by dividing up the area of a frame into a collection of tiles. For each tile in the tile_grid, record the following information in a TileMonitor structure: 4.1. The row this tile belongs to. 4.2. The col this tile belongs to. 4.3. The rectangular roi_orig that records the area of sample_orig that this tile corresponds to. 4.4. The rectangular roi_down that records the area of sample_down that this tile corresponds to. 4.5. The current state of the tile, which can be one of STABLE, CHANGING, STABILIZING, or STABLE_WITH_ NEW_CONTENT, initialized to STABLE. 4.6. A count n_stable_samples that records across how many samples the tile has been stabilizing, initialized to 0. 4.7. A cur_center_of_mass that records the current center of foreground content, initialized to undefined. 4.8. A prey_center_of_mass that records the most recent center of foreground content, initialized to undefined. 4.9. A last_stable_center_of_mass that records the most recent center of foreground content that was deemed stable, initialized to undefined.
[0039] The following main process is then repeated for each frame of the stream as detailed by way of example in TABLE 2.
TABLE-US-00002 TABLE 2 1. A frame_step is computed as the current frame number modulo the number of frames_per_sample, which is a parameter that identifies how many tile frames are averaged together into a single sample. 2. If frame_step is zero, then this is the first frame in a sample set and so perform the following steps: 2.1. If the size of the recent records array is equal to n_ samples_stability_window, which is a parameter that defines how many samples must be classified as stable before an update can be sent, then remove the oldest record in recent_records. 2.2. Create an empty record and add it to recent_records. 2.3. Initialize sample_orig in the most recently added record to an empty image with dimensions equal to the dimensions of the frames in the video stream. 3. Identify the most recently added record in recent_records as cur_rec. 4. Add in the current frame to cur_rec.somple_orig. 5. If frame_step is equal to one less than frames_per_sample, then we have arrived at a sample boundary and the following steps are performed: 5.1. cur_rec.sample_num is recorded as the frame number integer divided by frames_per_sample. 5.2. Generate a true average by dividing cur_rec.sample_orig by frames_per_sample. 5.3. Scale down cur_rec.sample_orig by scale_factor, placing the result in cur_rec.sample_down. 5.4. Threshold cur_rec.sample_down to make a mask cur_rec.msk_adaptive to provide an estimate of foreground content in contrast with the whiteboard background. Although there are several ways to do this, it has been experimentally determined that an ideal way is to use an adaptive thresholding function on each color channel and then combine each channel together using a bitwise OR operation. More specifically: 5.4.1. Initialize cur_rec.msk_adaptive to an empty image. 5.4.2. Repeat for each channel in cur_rec.sample_down: 5.4.2.1. Execute the OpenCV adaptivethreshold function on the channel 5.4.2.2. Bitwise-or the results of adaptivethreshold into cur_rec.msk_adaptive. 5.4.3. Clear out holes in and slightly expand the size of cur_rec.msk_adaptive using morphological operations. This will help identify areas of strokes where the whiteboard marker may have faded and consequentially were not initially identified in cur_rec.msk_adaptive as well as reduce flickering from sample to sample. One way to accomplish this is with OpenCV functions: 5.4.3.1. Obtain a morphological structuring element of a pre-configured size using OpenCV's getStructuringElement. 5.4.3.2. Dilate cur_rec.msk_adaptive using OpenCV's dilate 5.5. Spatially monitor the foreground for static content. Start by initializing any_updates to false and then for each tile in the tile_grid do: 5.5.1. Call a function monitor_tile( ), explained below, with parameters cur_rec.sample_nun and cur_rec.msk_adaptive (which is the mask of estimated foreground content) that returns the current state of the tile. 5.5.2. If the returned state is STABLE_WITH_NEW_CONTENT, then set any_updates to true. 5.6. If any_updates is true, then a tile has new content to share based on the foreground estimate. 5.6.1. Now generate the full foreground: 5.6.1.1. Average all sample_orig images across all records in recent_records to avg_sample_orig. 5.6.1.2. Average all sample_down images across all records in recent_records to avg_sample_down. 5.6.1.3. Average all msk_adaptive masks across all records in recent_records to avg_msk at. 5.6.1.4. For every record in recent_records, generate msk_canny if it is missing: 5.6.1.4.1. Initialize cur_rec.msk_canny to an empty image. 5.6.1.4.2. Repeat for each channel in cur_rec.sample_down: 5.6.1.4.2.1. Execute the OpenCV canny_edge function on the channel 5.6.1.4.2.2. Bitwise-or the results of canny_edge into cur_rec.msk_canny. 5.6.1.4.3. Clear out holes in cur_rec.msk_adaptive using morphological operations. One way to accomplish this is with OpenCV functions: 5.6.1.4.3.1. Obtain a morphological structuring element of a pre- configured size using OpenCV's getStructuringElement. 5.6.1.4.3.2. Dilate cur_rec.msk_canny using OpenCV's dilate 5.6.1.4.3.3. Erode cur_rec.msk_canny using OpenCV's erode 5.6.1.5. Average all msk_canny masks across all records in recent_records to avg_msk_cn. 5.6.1.6. avg_msk_at is an average of recent adaptive threshold masks. Threshold that to find the majority of pixels that are on using OpenCV's threshold operation. 5.6.1.7. avg_msk_cn is an average of recent canny edge masks. Threshold that to find the majority of pixels that are on using OpenCV's threshold operation. 5.6.1.8. Call the function IdentifyForeground( ), detailed below, with parameters avg_sample_down, avg_msk_at, and avg_msk_cn which returns the identified foreground based on avg_sample down. 5.6.1.9. Generate the full foreground by scaling the returned identified foreground up to the dimensions of avg_sample_orig. 5.6.2. Repeat for all tiles in tile_grid: 5.6.2.1. If the tile's state is either STABLE or STABLE_WITH_NEW_CONTENT, then: 5.6.2.1.1. Copy the tile's portion of the full foreground to update_fg. 5.6.2.1.2. Copy the tile's portion of avg_sample_orig bitwise-anded with the tile's portion of the full foreground to update_img, adding in the foreground as an alpha channel. 5.6.3. Share update_img among collaborators.
[0040] The function monitor_tile(sample_num, foreground) can be expanded, for example, as detailed in TABLE 3.
TABLE-US-00003 TABLE 3 1. If the state is currently STABLE_WITH_NEW_CONTENT, set the state to STABLE. 2. Identify the sub-region offoreground that overlaps with roi_down as tile. 3. Identify cur_center_of_mass as the average position of all foreground pixels in tile. 4. Read the tile's current state. 4.1. If the tile's state is STABLE, then: 4.1.1. See if the tile is no longer stable. Set res to the result of calling the function significant_change( ), detailed below, with the parameters last_stable_center_of_mass and cur_center_of_mass which returns a bool. If res is true, then: 4.1.1.1. Set n_stable_samples to 0. 4.1.1.2. Set the state to CHANGING. 4.2. Else (the tile's state is not STABLE): 4.2.1. See if the tile is now stable. Set res to the inverse of the result of calling the function significant_change( ) with the parameters prev_center_of_mass and cur_center_of_mass. 4.2.2. Read res. 4.2.2.1. If res is true, then: 4.2.2.1.1. Set the state to STABILIZING. 4.2.2.1.2. Increment n_stable_samples by 1. 4.2.2.1.3. If n_stable_samples is greater than n_samples_stability_window, then: 4.2.2.1.3.1. See if the center of mass has significantly changed overall. Set res2 to the result of calling the function significant_change( ) with the parameters last_stable_center_of_mass and cur_center_of_mass. 4.2.2.1.3.2. Read res2. 4.2.2.1.3.2.1. If res2 is true, then: 4.2.2.1.3.2.1.1. Set last_stable_center_of_mass to cur_center_of_mass. 4.2.2.1.3.2.1.2. Set the state to STABLE_WITH_NEW_CONTENT. 4.2.2.1.3.2.2. Else (res2 is false): 4.2.2.1.3.2.2.1. Set the state to STABLE 4.2.2.2. Else (res is false): 4.2.2.2.1. Set n_stable samples to 0. 4.2.2.2.2. Set the state to CHANGING. 5. Set prev_center of mass to cur_center_of_mass. 6. Return the state.
[0041] The function significant_change(center_of_mass1, center_of_mass2) can be expanded, for example, as detailed in TABLE 4.
TABLE-US-00004 TABLE 4 1. Identify the Euclidean distance d between center_of_ mass1 and center_of_mass2. 2. Return whether or not d is greater than a predetermined threshold distance (e.g., 3).
[0042] The function IdentifyForeground(img, msk_adaptive, msk_canny) can be expanded, for example, as detailed in TABLE 5.
TABLE-US-00005 TABLE 5 1. Compute the average pixel value of all outermost border pixels in img, excluding any corresponding foreground pixels identified (i.e., “on”) in msk_adaptive. Store the result in avg. 2. Set bkgrnd to the result of a bitwise-or operation between msk_adaptive and msk_canny. Combining both masks together increases the odds of finding complete edges of foreground objects. However, in practice it has been observed that canny edge detection finds the outside border of objects, which are technically not foreground, so the effect of the canny mask will be removed at a later step. 3. Repeat for every outermost border pixel p in img: 3.1. If p is not currently marked in bkgrnd and the value of p is greater than or equal to avg in all color channels, then: 3.1.1. Initiate a flood fill from p on bkgrnd setting all flood-filled pixels to a value of 127. 4. Set the pixels of bkgrnd to 0 in all cases where the pixels of bkgrnd are not equal to 127. 5. Set the pixels of bkgrnd to 255 in all cases where the pixels of bkgrnd are equal to 127. 6. At this point, all “on” pixels in bkgrnd should correspond to background on the whiteboard, but not all background on the whiteboard are necessarily identified as “on” pixels in bkgrnd. Hence, every potential foreground object has to be investigated for holes. Any pixels identified in msk_adaptive are assumed to be foreground (i.e., not a hole), but as noted in step 2 above, any pixels in msk_canny will also require a closer investigation to determine if they are truly foreground. Hence, set holes to the result of a bitwise-and operation between 255-bkgrnd and 255-msk_adaptive. All “on” pixels in holes will require a more detailed investigation to determine whether or not it really is background. 7. Identify all connected components cc (e.g., using OpenCV's connectedComponents) in holes. This identifies all groupings of connected pixels in holes or in other words identifies each individual potential hole. 8. Repeat for each connected component c (i.e., hole) in cc (i.e., set of all holes): 8.1. Find the bounding box bbox of c as well as the average pixel value hole_avg of all corresponding pixels in img of c. Also identify the number of pixels in c as num_hole_pixels. 8.2. Starting in the center of bbox, expand the perimeter from the center outwards in growing rectangles identifying the set of all neighboring background pixels in bkgrnd until the count of neighboring background pixels meets or exceeds num_ hole_pixels. Determine the average pixel value of corresponding pixels of the set of neighboring background pixels in img as neighboring_avg. 8.3. Determine if, on average, the hole qualifies as background. This is done by comparing the difference d between hole avg and neighboring_avg per color channel. Determine if d in any color channel exceeds a predetermined threshold. 8.4. If d exceeds a predetermined threshold, then: 8.4.1. The hole overall is not background, but some pixels may be. Repeat for every pixel in c: 8.4.1.1. Compare the difference between the pixel and neighboring_avg per color channel. If the difference in all color channels is less than or equal to a predetermined threshold, then: 8.4.1.1.1. Set bkgrnd at the corresponding pixel to “on” (e.g., 255). 8.5. Else (d does not exceed a predetermined threshold): 8.5.1. Set bkgrnd to the result of a bitwise-or operation between bkgrnd and c. 9. Return foreground as the inverse of bkgrnd.
[0043]
[0044] In the example of
[0045] The example method of one or more embodiments operates on a series of images from a video stream. The video stream may be a pre-recorded collaboration session or a live stream of a current collaboration session. Before the first image in the video stream is processed, initialization is performed as detailed in TABLE 1 above. The process described below is then repeated for each image of the video stream.
[0046] Each frame in the video stream is broken up into tiles and analyzed for new static user content using a quick estimate of foreground content. In practice, the estimate generally identifies just the outline of any objects placed on the whiteboard. Once new static user content has been identified in any tile based on the estimate, a more rigorous process is initiated to identify the full foreground content, including the interiors of any objects. Accordingly, an update of static user content present in any tile is shared with remote participants in the collaboration session based on the full foreground identification and an average of previous stable samples. Identifying the new static user content using the quick estimate of foreground content advantageously reduces the computing resources and image processing time. Generating the updated static user content using the more rigorous process further advantageously allows both thin text strokes as well as patterns with solid fill (e.g., a physical object, user drawn solid figures) to be shared as the user static content sent to the remote participants in the collaboration session.
[0047] Further, automatically transmitting new static user content when detected advantageously eliminates a user's manual initiation of the capture and sending of the content to remote participants in the collaboration session. Such transmission of a tile's static user content based on determining when new content is available and stable also advantageously minimizes (i.e., reduces) the number of necessary content data transmissions to remote participants in the collaboration session. Furthermore, during the content data transmission, the tiles without new static user content are excluded from the transmission. Excluding the tiles with no new user static content advantageously minimizes (i.e., reduces) the amount of content data in each of the content data transmission to remote participants in the collaboration session. Furthermore, automatically transmitting the new static user content will also advantageously allow content to be seen by remote participants sooner than had the user manually initiated the capture.
[0048] The process will now be discussed in more detail. Steps 1-4 in the main algorithm in TABLE 2 above are initial preparation tasks. These initial steps are used to prepare data samples for subsequent analysis. Each set of consecutive n (e.g., n=2 in an example implementation) frames in the video stream are averaged to generate an averaged sample that minimizes the effects of motion and maximizes the effects of static user content. Any user content on the whiteboard identified as pixels in each image of the set show up strongly (i.e., exhibit higher numerical values) in the averaged sample. In contrast, any user motion is likely identified as disparate pixels in different images and consequently does not show up strongly (i.e., exhibit lower numerical values) in the averaged sample. For example, consider the two averaged samples (301a) and (301b) shown in
[0049] Throughout the discussion below, the averaged sample described above is referred to as a sample. In addition to the aforementioned averaging, a log of recently generated data, recent_records, is checked to see if it exceeds the size of the stability window, which is the number of samples that must be deemed stable for an update to occur. If the size of the stability window is exceeded, then the oldest entry is removed before a new one is started. The data recorded in this log is detailed in TABLE 1 above but in general it is all of the data required over the stability window to generate a full foreground and provide an update of stable content.
[0050] All subsequent processing happens on a sample by sample basis. That sample-by-sample processing occurs in the sub-steps of step 5 in the main algorithm in TABLE 2 above. In particular, estimated foreground content is identified in each sample by running an adaptive thresholding function on each color channel of the sample and using a bitwise-OR function to combine all color channels together into a single binary image that corresponds to msk_adaptive listed in TABLE 2 above. As shown in
[0051] Continuing with the sample-by-sample processing, the next step is to identify the center of mass (COM) in each binarized sample. The COM is computed as the average location of all estimated foreground (white) pixels in the binarized sample. The COM is assigned an “undefined” status when the total number of estimated foreground (white) pixels in the binarized sample is less than a pre-determined threshold (e.g., 10). The COM is used for motion tracking and stability identification. For the two binarized samples (302a) and (302b), the COM is identified by the icon “x” to generate the marked samples (303a) and (303b). The averaged sample (301a) and the binarized sample (302a) correspond to the marked sample (303a) with the COM (313a), the averaged sample (301b) and the binarized sample (302b) correspond to the marked sample (303b) with the COM (313b). A slight shift exists between the COM (313a) and the COM (313b) as result of a noise pattern (312b) being identified as additional foreground from the binarized sample (302a) to the binarized sample (302b).
[0052]
[0053]
[0054] In samples 1 and 2 shown in
[0055] For sample 0 through sample 6, as detailed in step 5.3 of the main algorithm in TABLE 2 above, the averaged frames image is scaled down. This is primarily done as a performance optimization. Then, the foreground estimate for each scaled down average is computed as detailed in step 5.4 using adaptive thresholding. In step 5.5 above, the foreground estimate is divided into tiles and each tile is monitored for changes and stability. In EXAMPLE 1 above, some of the foreground estimate pieces are illustrated (seen as “Fgd Est”) for the 6 tiles immediately encompassing the apple.
[0056] In sample 3 depicted in
[0057]
[0058] Similar to the EXAMPLE 1 above, each sample in the sequence of EXAMPLE 2 is divided into 6 rows (i.e., row 0 through row 5) and 8 columns (i.e., column 0 through column 7) resulting in 48 tiles. The tile grid dividing each sample is omitted for clarity.
[0059]
[0060] In the EXAMPLE 2, no foreground content is detected in sample 0. With sample 1, the user's hand enters the scene and provides enough contrast to register an edge on the foreground estimate. In step 3 of TABLE 3, the COM of all foreground pixels in the estimate is computed as the average location of all foreground content. In step 4, a determination is made based on whether the tile's state is currently STABLE. If so, then the tile monitor determines whether or not the tile is no longer STABLE (branch 4.1). Otherwise, the tile monitor determines whether the tile has now become stable (branch 4.2). At the start of monitoring for sample 1, the tile is STABLE and is checked to see whether the newly computed current COM (36.9, 40.3) has significantly changed from the last stable COM (undefined). This is registered as a significant change and so the state is updated to CHANGING for sample 1.
[0061] With sample 2, the new current COM is computed (22.7, 34.3). Now, since the state is currently CHANGING, branch 4.2 is processed to determine if the tile has now stabilized. It is determined if there is not a significant change from the previous COM (36.9, 40.3) to the current COM. In this case, there is a significant change and therefore branch 4.2.2.2 is executed and the tile remains in a CHANGING state for sample 2.
[0062]
[0063] With sample 4, the algorithm again processes branch 4.2 but now the COM does not significantly change (undefined to undefined) and so branch 4.2.2.1 is executed. Here, the state changes to STABILIZING and the number of stable samples is incremented to 1. In step 4.2.2.1.3, it is determined that the number of stable samples has not reached the stability window (e.g., 2 samples) and so processing for this sample ends.
[0064] The same processing happens with sample 5 as with sample 4, but this time the stability window (e.g., 2 samples) has been reached and so branch 4.2.2.1.3.1 is executed. In this case, it is determined if the change qualifies for an update. In other words, it is determined if the last stable COM (undefined) has significantly changed to the current COM (undefined). In this case, it has not, and therefore the tile becomes STABLE, but there is no new content to share.
[0065] Processing continues in this manner, as depicted in
[0066]
[0067] The first step in TABLE 5 is to compute the average pixel value of all the border pixels in img, excluding those that are identified as foreground in msk_adaptive. This is done to identify suitable places to launch a flood fill in a subsequent step.
[0068] In step 2 of TABLE 5, bkgrnd is initially set to the result of a bitwise-or operation between msk_adaptive and msk_canny. This results in the mask (361) shown in
[0069] In step 3 of TABLE 5, a flood fill of bkgrnd is initiated from the border pixels but only if the pixel is not already marked (i.e., “1” or “ON”) in bkgrnd and if the corresponding pixel in img is greater than the average border pixel previously computed. This second condition helps ensure that flood filling occurs from the brightest portions which are likely to be whiteboard background (and not, for example, from the users hand and/or arm). In this case, a single flood fill is launched from border pixel (94, 0) setting flooded pixels to color value 127 (i.e., gray) resulting in the flooded image (362). In TABLE 5, bkgrnd is an 8-bit deep mask with pixel values of 0 to 255 as an interim step to generate a true binary mask where all pixels are strictly ON or OFF by the end of step 5 in TABLE 5.
[0070] In step 4 of TABLE 5, the pixels of bkgrnd are set to 0 in all cases where the pixels are not equal to 127. These pixels are known to NOT be background. Then, in step 5 of TABLE 5, the pixels of bkgrnd are set to 255 in all cases where the pixels are equal to 127. These are the flood filled pixels and are assumed to be background. At this point, bkgrnd looks like the mask (363) as an example of the content of the variable bkgrnd at the end of step 5 of TABLE 5, which is referred to as “starting background” depicted in
[0071] In bkgrnd, all ON (white) pixels shown in the mask (363) (i.e., starting background) are considered as known background. However, not all background pixels in the sample are necessarily shown as ON (white) in the mask (363). In other words, some OFF (black) pixels in the mask (363) may also be background and correspond to an interior hole of a foreground object in the sample. Hence, every potential foreground object has to be investigated for holes. Any pixels identified in msk_adaptive (i.e., estimated foreground content) are assumed to be foreground (i.e., not a hole), but as noted in step 2 above, any pixels in msk_canny will also require a closer investigation to determine if they are truly foreground. Hence, in step 6 of TABLE 5, holes is set to the result of a bitwise-and operation between 255—bkgrnd (i.e., inverted starting background) and 255—msk_adaptive (i.e., inverted estimated foreground content), which is shown as the candidate holes mask (364).
[0072] All “ON” pixels in candidate holes mask (364) will require a more detailed investigation to determine whether or not it really is background.
[0073] In step 7 of TABLE 5, all connected components are identified in a candidate holes mask (364). In this case, 105 individual connected components are identified.
[0074] In step 8 of TABLE 5, iterative hole traversal and background mending is performed on the starting background. Each connected component in candidate holes mask (364) is processed to determine if it qualifies as foreground or background by comparing the corresponding pixel intensities of the connected component in img (351) to the average pixel intensity of neighboring pixels. The neighboring pixels are accumulated as the closest neighboring pixels of known background with a count approximately equal to the number of pixels in the connected component. Pixels in the connected component are first compared based on the average value of corresponding pixels in src followed by individual pixel comparisons. The content of bkgrnd at the end of step 8 of TABLE 5 is referred to as “updated background” depicted in
[0075]
[0076]
[0077] Embodiments of the invention may be implemented on virtually any type of computing system, regardless of the platform being used. For example, the computing system may be one or more mobile devices (e.g., laptop computer, smart phone, personal digital assistant, tablet computer, or other mobile device), desktop computers, servers, blades in a server chassis, or any other type of computing device or devices that includes at least the minimum processing power, memory, and input and output device(s) to perform one or more embodiments of the invention. For example, as shown in
[0078] Software instructions in the form of computer readable program code to perform embodiments of the invention may be stored, in whole or in part, temporarily or permanently, on a non-transitory computer readable medium such as a CD, DVD, storage device, a diskette, a tape, flash memory, physical memory, or any other computer readable storage medium. Specifically, the software instructions may correspond to computer readable program code that when executed by a processor(s), is configured to perform embodiments of the invention.
[0079] Further, one or more elements of the aforementioned computing system (400) may be located at a remote location and be connected to the other elements over a network (412). Further, one or more embodiments of the invention may be implemented on a distributed system having a plurality of nodes, where each portion of the invention may be located on a different node within the distributed system. In one or more embodiments, the node corresponds to a distinct computing device. Alternatively, the node may correspond to a computer processor with associated physical memory. The node may alternatively correspond to a computer processor or micro-core of a computer processor with shared memory and/or resources.
[0080] One or more embodiments of the present invention provide the following improvements in electronic collaboration technologies: automatically sharing user content on a marker board with remote collaborating users without the user having to manually send the content data; limiting the amount of content data transmission to the portion of the marker board with new content; minimizing the number of content data transmissions by automatically determining when the new content is stable prior to transmission; improving performance in detecting new static user content by down scaling the image sample and using simplified foreground content estimation.
[0081] While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. Accordingly, the scope of the invention should be limited only by the attached claims.