Joseph’s Status Report for 03/13/2021

This week I have have looked into getting the coordinates of the corners as well as using the background subtractor. As for the corners, I have found that most of them have values from 0-500, but I realized the values might be pointless without coordinating it with the camera. Hence, I have decided to work on the background subtractor first, see if the camera can recognize the moves, and come back to coordinating the whole steps together. For the background subtractor, I was able to use it on my own webcam on my own video, but I was not able to use it for our purpose, which is comparing two frames to see which coordinates are moving. This was particularly hard for me as  I was working remotely in Korea and did not have access to the chessboard with me to take a video. However, I have requested these to Jeewoong and he was able to take some pictures which I will get working on next week.

As for the schedule, I am on schedule with the initially planned schedule. I might not be next week though because I am switching up some tasks in the future weeks.

Next week, I am going to try to figure out using the background subtractor on two frames and getting to see if it is able to recognize the coordinates of which piece moved correctly. If this is successful, I will get working on detecting the corners correctly so I can get started on the move detection as a whole. There might be more steps than just getting the computer vision to work properly since our team is planning on getting each of tiles set up correctly and the location of pieces set up correctly.  Hence, I want to finish the CV part quickly so I can get started on that.

Michael’s Status Report for 3/6/2021

This week we worked on finalizing our design and made several changes based on TA/Instructor feedback. As such we will be using hard processor system (HPS) on the FPGA chip as well as an RPi to interface with the HPS. We decided on this because it would ease the integration steps as I will be the only member with access to the FPGA.

As for scheduled tasks, I have set up the Intel default linux distribution onto the FPGA’s HPS and also set up serial communication between the HPS and my computer. This process will be similar to what we imagine our final integration will look like with two programs interfacing with one another via the UART system. Rather than streaming the entire Linux OS output via UART. Basic UART communication between my computer and the FPGA is pictured below.

I have also begun sketching out some of the basic rules and board representations which I will need to consider when generation legal moves via FPGA custom hardware.

https://www.chessprogramming.org/Board_Representation

https://www.chessprogramming.org/Move_Generation

These two link describe the basics which my system verilog implementation must consider. I have also looked over the stockfish open source code to see what slight modifications I will need to make to it to make use of the additions I am planning. Specifically, I should be looking at modifying move generation.

That’s all for this week, next week I will make more progress into working with the HPS and also continue with my system verilog implementation.

Team Status Report for 03/06/2021

As the professor and the TA recommended, we decided to use Raspberry Pi and FPGA instead of using a computer. We believe the computer vision part of our project and the user interface can be run through RPI and FPGA can take care of every move generation and chess AI. It makes sense that RPI can handle image processing, so it is unnecessary to use a computer for image processing.

Since we decided to use RPI, we had to do some research on how FPGA and RPI will be communicating. We figured out that we can still use the UART connection from FPGA to RPI for the communication between two hardware and use the ARM core processor for running an AI on FPGA. Once we are finished with board detection on the computer vision side of the project, we are planning to try out the aforementioned communication between RPI and FPGA so that we can confirm this design works well.

Joseph and Jee Woong made some progress on board-detection, and Michael is testing the ARM core processor based on the setup he created last week. It is good that all our team members are following the schedule we planned.

Jee Woong’s Status Report for 03/06/2021

This week I started working on board-detection. Since our team agreed to first work on images of the board, I took a photo of our chessboard and tested the detection algorithm. As you can see from the picture below, it can detect the corners of the board and find the coordinates of the corners. The printed arrays are the x and y coordinates of each corner.

    

However, the issue is when chess pieces are on the board. I have figured out that the computer vision algorithm that I wrote no longer works when there are pieces on the board. So, I need to figure out how I should be finding the square tiles and their corners of the board when pieces are placed.

Furthermore, Joseph and I are working together on this part, and we are planning to test board-detection with photos that I took and move on to real-time detection of the board using a webcam. We already wrote some code on real-time detection, so I hope we can work more on board-detection with images next week and hopefully move on to real-time detection.

Joseph’s Status Report for 03/06/2021

This week I have detected some chessboard corners. I made two ways of doing this; the first way is to use my internal camera to detect chessboard in real-time. The other way is to simply just use frames to detect the corners. I also realized it might be better to first simply work on frames first and then try to do real-time if necessary.  Some issue that I found was that the detection of chessboard works on a black and white chessboard, which is not the one I have currently. When I get back to US, I think I can use the black and white board so that it works much better. I have also worked on the design presentation as well with my group.

As for the schedule, I am on schedule with the initially planned schedule.

Next week, I am going to try to figure out the coordinates of the chessboard tiles to make a grid structure. After discussing with my teammates, this seems like the easy way to go about detecting moves since the board is almost not recognizable by the chessboard when it has pieces on it.

Team Status Report for (2/27/2021)

This week, we had finalized our project proposal presentation as well as all the components that went into it. The planning aspect has helped us greatly so that we can see how we are progressing and how quickly we must progress to meet our deadlines. Also the project block diagram has made sure that all team members are on the same page on how integration will work and clarifies what exactly we are working on.

Drew and Joseph have set up their environments to begin work with openCV and Michael has set up his environment to work with the FPGA. All members have begun writing some code to either test out the modules and libraries they are using or to sketch out their code and plans.

We have ordered all the basic components which are needed for the computer vision aspect of the project and a github repository has been created so that we can collaborate on this aspect of the project easily.

All team members have gotten their environments setup and will begin implementation in the coming weeks as scheduled in our Gantt chart. Hence, everyone is on schedule and have met their goals for this week.

Michael Status Report for 2/27/2021

This week, after finishing the project proposal slides with my teammates, I have begun working on the system verilog implementation of the chess game logic. I have begun sketching out a high-level block diagram for how I want to represent pieces in my system and how I want to implement something such a packet to send via UART. I have a very rough SV module currently that roughly implements the board state as a 64-word register. This will act as my starter code for the rest of the deliverables.

I have also begun to set up my environment. I have installed Quartus Prime lite on my computer and have begun reading the documentation for the UART IP block which comes with Quartus. My main challenge for next week is implementing a basic module which sends and receives basic packets from my computer. I will also formally request an FPGA from the ECE department. After reviewing the list of available FPGAs I will likely request a DE-10 Standard Dev kit and a UART to USB cable as this is the FPGA that I am most familiar with.

I am currently on schedule with the Gantt chart and scheduling plans we had agreed on in our project proposal.

Jee Woong’s Status Report for 02/27/2021

This week, we had a proposal presentation. Since I was the first presenter of the team, I prepared my presentation with my teammates and discussed some of the important aspects of our project. After I finished my presentation, I ordered a chessboard, webcam, and webcam stand for each one of us. The chessboard and webcam stand arrived on time, so I could check if the chessboard was the right chessboard we could detect through the webcam.

Furthermore, I set up a git repository so that all of our team can work. Most importantly, I read documents about OpenCV and how our program should read the chessboard through a webcam. After reading the documents, I tried reading images through my own webcam, and this testing worked out well. I have also found a useful function we can use for recognizing the 8×8 board. The image below is an example of detecting the chessboard, and I am also planning to try it by myself.

Calibration Pattern

I am looking forward to testing with my own images first and use the webcam to frame images and do similar testing. For next week, I hope I could write I report that I successfully tested board detection through the webcam.

Joseph’s Status Report for 02/27/2021

This week I have set up the environment for OpenCV. This was my first time using OpenCv, so I had to look at some documentations to set it up. After setting up, I have tried grayscaling some images and also have set up my git environment. I have learned how to use paths in Python to get the code working for everybody instead of my local environment.  I have also tested out some images to test out simple grayscaling. As I am currently in Korea, I have also decided to just buy the same Logitech camera I am going to use when I get back to Pittsburgh. This will be particularly useful for next week when I will get the board and the camera to detect the corners of the chess board.

As for the schedule, I am on schedule with the initially planned schedule.

Next week, as I have mentioned, I have just bought a camera on my own and is hoping it will arrive in time for me to start working on detecting the corners of chessboard. If it does not arrive in time, I am hoping at least the chess board will arrive so I can simply use my webcam to detect the corners. If that even does not work, I will just rely on some images from the web.

Team Status Report for 02/20/2021

Thanks to the advice from the professor and the TA, we could finalize our team project’s direction. We were considering using a customized LED board, but we realized that all the work to solder LED on a Chessboard is not worth it. Rather, we chose to use a monitor screen to show the moves of an AI and a user. This way, we believe that our overall project will be more concise and value more on the part of the project that is more crucial. Furthermore, using a monitor will make debugging much easier than using a customized LED board. A monitor will clearly show an update of the board which we can easily track down the progress as the board gets updated. After we have finalized the route of our project, we listed down and divided the tasks that are required for the project. As we broke down the components, we could grasp a rough timeline of how we should progress our Capstone project. Besides, we all contributed to making a proposal presentation which is coming up next week. We are looking forward to our proposal presentation.