Denise’s Status Report for 4/30/2022

This week I worked on integrating the image cropping code with the rest of the codebase and starting implementing an SVG writer to output the objects on the screen into lines in SVG format, such that modifications can be sent over sockets quicker, parsed through by our SVG parser, and also exported as an SVG file if needed. After our final demo I also began looking into HSL(hue, saturation, lightness) for line detection as opposed to greyscale, since HSL would be more robust against lines of varying widths and within shadows.  Currently I am looking at an implementation similar to the one described here. 

Next week I will be working on finishing the final poster, the final report as well as the SVG writer. If there is still time available I will implement HSL line detection as well.

Currently we seem to be on schedule but there is quite a bit of integration to be done.

Denise’s Status Report for April 23, 2022

This week I worked on finishing the image cropping feature such that the background is removed whenever we convert an image to a SVG, such that we will not capture the background objects within our diagram. In order to do so we find the biggest contour within the image and create a bounding box around it. After that we scale the bounding box down to remove the hand that’s holding the paper. Currently I’m working on creating a function to write the contents of the diagram back into an SVG file such that new modifications can be sent over the server. I have also worked on collecting results and updating the slides for the final presentation

Left: Original image; Right: Cropped image

Currently I am on schedule, and am picking up smaller tasks that were not originally planned.

Denise’s Status Report for April 16

This week I worked on implementing a cropping feature to remove the background of the image captured by the camera such that we only vectorize the diagram. My approach was to greyscale the image, apply another filter to make the image black and white, and apply a morphological erosion and dilation to remove noise. After that we will apply the openCV border detection to find the largest contour, fill it, and then use that as a mask to isolate the image.

Currently our approach works however the mask generated is a little too sensitive to the lighting and the hand holding up the paper as shown in the images below. This is likely because we’re using a binary filter to convert the image to black and white that results in very jagged contours. We hope to remedy this by fitting a bounding box around the contour and then filling the bounding box instead of the contour to generate our mask. This is still currently a work in progress.

Left: Original photo;    Right: generated mask

     

I am a little behind schedule but I should be able to wrap this up and get back on track next week. I hope to finish the image cropping and then will help Lisa out with the SVG transformations, and new SVG file generation.

Denise’s Status Report for 04/09/2022

This week I implemented an SVG parser to parse through an SVG file line by line and extract the endpoints of the path in order to produce straight lines. I then modified this feature by having it parse through all the points within a path and extracting only the points that produce an angle of less than 100 degrees such that points that form obtuse angles with their neighbors are removed. This method helps reduce the complexity of the shapes by removing points while also enabling us to produce polygons as opposed to just lines.

I researched different methods of cropping the image captured by the camera such that we only capture the paper and the diagram on it. Currently our approach is to greyscale the image, apply another filter to make it black and white, and apply a morphological erosion and dilation to remove noise. After that we will apply the openCV border detection and then use that to crop the background of the image. It is currently a work in progress.

We had to modify our schedule a little bit this week but we are currently on track. Next week I hope to finish this portion of removing the background image and then help Lisa integrate the SVG parser with the code to render the SVG files onto the whiteboard.

Denise’s Status Report for 4/02/2022

This week I finished modifying the use-case requirements, abstract, and testing portions of the design report in preparation for our final report. I also integrated the computer vision component with the vectorization portion such that once the image is captured; it will be written as a .jpeg file to DrawBuddy/vectorization/inputs where it will then be fetched by a call to the VTracer API and vectorized as a .svg file in the DrawBuddy/vectorization/results folder.

I also began looking into ways we can display .svg files not as .pngs onto our whiteboard display since this was a problem we did not account for. We had assumed svgUtils had additional function for displaying .svg files but currently pyQt looks promising. The remaining work to integrate the rest of our project includes taking the .svg file and outputting it onto our virtual whiteboard.

In terms of identifying straight lines, I discussed with Lisa and  we’re thinking of pivoting to performing this on the post processing side such that the user can explicitly mark which lines they would like to straighten as opposed to trying to produce and algorithm that could estimate the user’s preferences.

I am a little behind schedule since setting up the whiteboard and displaying objects onto it were setbacks that we did not expect. However this is a minor setback and we should be able to get back on schedule within the next week or so.

Next week we hope to have a fully integrated system for vectorization. such that  a user can click our vectorize button and it will take whatever image the user has and output it onto the whiteboard. More work will need to be done to filter the noise from the image and send the images to connected peers.

I also hope to begin working on the translation and resizing features of objects within the image on our whiteboard.

Denise’s Status Report for 3/19

During this past week  I was successfully able to turn transform .jpeg and .png files comprised of lines like the one depicted below in .svg files using VTracer via a Python script.

This week I also reviewed the design feedback and after meeting with professor Savvides, I discussed with my group about pivoting to adding marks to the physical diagrams to identify which lines should be straight within the diagram. Note that these marks should not be rendered in the final image. I have been reviewing our design report and making modifications to the use case requirements, abstract, and introduction based on the feedback. I also have been discussing with my team

In terms of the planned work, I am ahead of schedule however editing the design report was not something we accounted for but overall I am still on schedule.

Once my teammates set up a bare bone Web App GUI, I will work on importing the .svg files and adding translation/scaling features to the GUI. I will need to add more to the Python script to correctly parse the files to generated from Lisa’s CV portion and write it to a directory accessible for Ronald’s server code. In the meantime, I will continue updating the design report.

Denise’s Status Report for 2/26

This week I worked on researching different .SVG converters since we decided to move our vectorization process into the software side in order to avoid having to compare different frames with a temporal approach. The two main methods I looked into were using Potrace and Vtracer. In the end we decided to go with Vtracer since it works with colored .PNG files as well and has better image fidelity; meaning that the .SVG resembles the image more accurately.

I also designed a mock up of our GUI in Figma and discussed with Ronald what features/buttons we should add for better user interactions.

GUI: https://www.figma.com/file/iI5Mw8cfi4QE14hJeFnFHg/DrawBuddy-GUI?node-id=0%3A1

I worked on putting together a design proposal presentation and focused on the use-case, use-case requirements, and system approach/implementation plan.

https://docs.google.com/presentation/d/14MaQNsqbtGYA0_ZN-x0DoQWcdriZ-3-VRN1r-oDmobM/edit?usp=sharing

 

Denise’s Status Report for Feb 19, 2022

This week I took a look at several algorithms to reduce the amount of points within a line such as the Douglas–Peucker algorithm, and the Visvalingam–Whyatt algorithm. The Douglas-Peuker algorithm has a faster runtime however the Visvalingam–Whyatt algorithm is more straightforward in terms of complexity, making it a viable back up. I also researched ways to convert an SVG file to an array of points and back such that the user can send their diagrams as SVG files to display to connected peers, but also be able to modify the primitives on their end which would be easier as an array of points.

I also worked on the use case, use case requirements, solution approach on the slides and mocked up the GUI using Figma. Currently we are on schedule. Next week I will be working with Lisa to finalize our vectorization approach and start writing code to convert files into SVGs. We will also be taking a look into how we can compare frames to subtract the lines drawn in previous frames using a temporal approach.

Denise’s Status Report for 2/12

During this week I helped put together the use case, use case requirements, and solution approach slides for our proposal presentation. After everyone added their content, I revised each slide to be more concise by reducing the amount of words for better readability.  After that I spent a couple of hours figuring out what I would say in each slide, practicing, and revising the presentation to fit it in under 12 minutes.

We currently are on schedule, although the schedule may need to be revised for more slack time.

This week I will work on continuing to research how to vectorize images, and then also take a look into strategies to translate and scale the vector objects. I will also look into algorithms to reduce the amount of points generated from CV.