Remote Control System Based on Compressed Image

Weichuan Liao

► To cite this version:

Weichuan Liao. Remote Control System Based on Compressed Image. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.259-263, 10.1007/978-3-642-18336-2_31. hal-01562788

HAL Id: hal-01562788

https://inria.hal.science/hal-01562788

Submitted on 17 Jul 2017

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Remote Control System Based on Compressed Image

Weichuan Liao¹

¹School of Fundamental Science, East China Jiaotong University, Nanchang, Jiangxi,
P.R.China

**Abstract.** Client computer controlling remote server computer or devices is usual for industry and agriculture automation. A monitor software system adopted C/S frame based on new algorithms of compressing image including improved LZ77, LZSS, LZW is designed. The client computer obtains compressed desktop image of remote server then decompresses the image on the client window to fulfill some mouse and keyboard actions of remote servers. Advantage of the control system by the new compress algorithms is that size of compressed image is smaller and system response time is shorter.

**Keywords:** Remote control, Server, Client, Compressed image.

# 1 Introduction

Remote control system software is developed by C/S frame, which adopted new algorithms of compressing image. Client computer can perform some mouse and keyboard actions of multiple remote servers to control remote terminal devices. First, Compressed desktop bitmap of remote server is transformed to a view of client computer, then the client decompresses the bitmap and displays the bitmap in the view, so the client can fulfill all kinds of operations of servers, such as starting or shutting down computer, opening files of servers etc. The client can monitor multiple remote servers by creating one view for every server. This remote control system takes shorter response time and less network traffic than other popular remote control systems.
## 2 Frame of Remote Control System

The remote control system adopts the popular C/S frame. Design of network communication bases on Winsock API of Microsoft windows system. The control system makes use of the recent improved algorithms of compressing image including LZ77, LZSS, LZW. The server computer compresses own desktop bitmap by some compressing algorithm and sends the compressed image to the client computer. After the client has received compressed bitmap then decompress the image, the client displays the image on a view of client window. In this view, the client executes mouse and keyboard actions which synchronously transmit to the server and server will execute same actions. The remote control system chooses VC++ Multi-document program. The system creates a new view when it controls a new server. Every server has a corresponding view of the client monitoring own desktop. It looks like a Trojan, but our purpose is beneficial for industry and agriculture automation.

<figure><img src="image_2.png" /></figure>

TCP/IP is used for communication protocol of servers and client. Win socket classes are selected for developing this software.
```c
//Mouse moves to new position based on commands of
//client computer.
MouseMove(point); //Set new position of mouse
// focus.
SendMSGData(m_sckClient, NULL, 0,
PL_TEMP); //Send message that
//mouse action has been finished.
}
break;
//other commands.
}
```

The following chart shows client how to control remote server computer.

<figure><img src="image_3.png" /><figcaption>Figure 2 How servers to execute commands from the client</figcaption></figure>

Server has started up two threads, one of them handles all commands of the client and other of them is responsible for sending desktop bitmap of server computer to the client. The last thread sends desktop bitmap of server computer based on one of three new algorithms of compressing image including improved LZ77, LZSS, LZW. Because of adopted new compressing algorithms, Size of compressed image is smaller and system response time is shorter.
# 4 Design of Client

Design of client uses the frame of multiple documents of VC++, the client can control multiple servers. The client creates new view display the bitmap after the client has received the compressed desktop bitmap of server computer and new document manage the data from server. Client managers can switch all of the views and control all servers. Improved algorithm LZSS is introduced by Wang, L.[3], improved algorithm LZW is introduced by Lan, B.[4]

Next, we will show the details how client to control mouse actions of remote server computer. The client displays the bitmap in a view of the client after the client has received the desktop bitmap of server. When the client move mouse point in the view, the new position of mouse focus will transmit to server, and the server has received the new position and will do the same things as the client, which moves the mouse focus to the same position as in the view of the client. The following figure 3 shows the procedure of the client moving mouse focus of server.

<figure><img src="image_4.png" /><figcaption>Figure 3 How the client to control mouse actions of servers</figcaption></figure>

To sure that the same mouse actions have been executed by the client and servers, we use the GetCurPos() function to get position of mouse focus of the view of client, and mouse_event function in the server thread moves the mouse focus of server computer to the same position.

Other control of actions, such as keyboard actions have the similar procedures will be not explained any more.

# 5 Conclusions

Our remote control system compares with some popular remote control systems in Chinese market by local network, takes less response time.
Response time of several systems

<table><thead><tr><td>Monitor System</td><td>Average Response Time</td></tr></thead><tbody><tr><td>RV-3000</td><td>354.5 ms</td></tr><tr><td>ZWPIC-GP</td><td>313.4 ms</td></tr><tr><td>Our System</td><td>254.1 ms</td></tr></tbody></table>

Here, we explained main parts of a remote control system which adopted new image compressing algorithms. This remote control system takes shorter response time and less network traffic than other similar remote control systems.

**Acknowledgments.** This work was partially supported by the Jiangxi Province Science Foundation No.2008GZS0012

References

1. Ma, L., Fang, K.L., A Remote Data Collect and Supervise System Based on Visual C++. Microcomputer Information. 24(14), 1155--1159(2008)

2. Liao, W.C., Wan, T., Object-Oriented Design of Drawing Tool. Computer Engineering & Design. 26(5), 1373--1376(2005)

3. Wang, L., Xu, Y., Application of Improved IZSS Algorithm in E-mail System. Journal of JILIN University(Information Science Edition). 23(3), 112--128(2005)

4. Lan, B., Lin X.Z., Application of an Improved LZW Algorithm in Image Coding. Computer Engineering and Science. 28(6), 210--215(2006)