JP7196209B2 - Communication device, control method and program - Google Patents
Communication device, control method and program Download PDFInfo
- Publication number
- JP7196209B2 JP7196209B2 JP2021003492A JP2021003492A JP7196209B2 JP 7196209 B2 JP7196209 B2 JP 7196209B2 JP 2021003492 A JP2021003492 A JP 2021003492A JP 2021003492 A JP2021003492 A JP 2021003492A JP 7196209 B2 JP7196209 B2 JP 7196209B2
- Authority
- JP
- Japan
- Prior art keywords
- response
- generated
- communication
- generating
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Studio Devices (AREA)
Description
本発明は外部装置と通信できる通信装置に関する。 The present invention relates to a communication device capable of communicating with an external device.
近年、デジタルカメラや携帯電話等の通信装置の通信機能の進歩に伴い、通信装置同士でコンテンツを送受信することが行われている。 2. Description of the Related Art In recent years, with the advancement of communication functions of communication devices such as digital cameras and mobile phones, content is being transmitted and received between communication devices.
特許文献1では、HTTPのようなサーバ・クライアントのシステムを用いて、デジタルカメラがサーバ側となってリモート撮影を実現することが開示されている。 Japanese Patent Application Laid-Open No. 2002-200000 discloses that a server-client system such as HTTP is used, and a digital camera acts as a server to realize remote photographing.
HTTPのサーバ・クライアントのシステムを用いたリモートコントロール機能をユーザに提供する場合、リモートコントロールされるデジタルカメラがサーバとなり、リモートコントロールする側がクライアントとなる。そして、クライアントとなる装置にデジタルカメラをコントロールするプログラムを実装することで、リモートコントロールを実現する。この場合、デジタルカメラをリモートコントロールするためのURLと実行可能なHTTPメソッドの組み合わせを通信API(Application Programming Interface)として公開することで、クライアントのプログラムの実装負荷を低減することが考えられる。対向機であるクライアントには、公開されたAPIの仕様に基づいて、リモートコントロールを実現するプログラムを実装する。この実装負荷をより軽減するために、チャンク送信を利用したAPIを用意することが考えられる。しかし、チャンク送信はHTTPレスポンスヘッダを返した後にHTTPレスポンスボディを繰り返し送信する送信方法である。そのため、HTTPレスポンスボディの送信の途中において、送信すべきデータを用意できない場合、デジタルカメラはHTTPレスポンスヘッダを用いてエラーを通知することができない。一方、エラーを通知するために、HTTPレスポンスボディにエラーの情報を含めると、対向機においてそのエラーの情報を解析するための処理が必要となり、対向アプリケーションの開発の実装負荷が増大してしまう。 When a user is provided with a remote control function using an HTTP server/client system, the remote-controlled digital camera serves as the server, and the remote-controlling side serves as the client. Remote control is realized by implementing a program for controlling the digital camera in the client device. In this case, a combination of a URL for remote controlling a digital camera and an executable HTTP method may be published as a communication API (Application Programming Interface), thereby reducing the client's program implementation load. The client, which is the counterpart machine, implements a program for realizing remote control based on the published API specifications. In order to further reduce this implementation load, it is conceivable to prepare an API using chunk transmission. However, chunk transmission is a transmission method that repeatedly transmits an HTTP response body after returning an HTTP response header. Therefore, if the data to be transmitted cannot be prepared during the transmission of the HTTP response body, the digital camera cannot notify the error using the HTTP response header. On the other hand, if error information is included in the HTTP response body in order to notify the error, processing for analyzing the error information is required in the counterpart machine, increasing the implementation load of developing the counterpart application.
そこで、本発明は、通信装置を制御するための対向アプリケーションを開発する際の実装負荷をより低減することを目的とする。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to further reduce the implementation load when developing a counterpart application for controlling a communication device.
本発明に係る通信装置の一つは、ライブビュー画像を生成する生成手段と、操作手段と、通信手段と、前記生成手段でライブビュー画像が生成された場合に、前記通信手段を介して外部装置から第二のリクエストを受信した場合、前記生成手段で生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行い、前記生成手段でライブビュー画像が生成されなかった場合に、前記通信手段を介して前記外部装置から前記第二のリクエストを受信した場合、エラーの発生を通知するための情報を含むレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行い、前記通信手段を介して前記外部装置から第一のリクエストを受信した場合、前記生成手段で生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを繰り返し行い、前記生成手段で生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とが繰り返し行われている場合に、ライブビュー画像が生成されなかった場合、前記生成手段で生成されなかったライブビュー画像の代わりに所定の画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うよう制御する制御手段とを有する。 One communication apparatus according to the present invention includes generation means for generating a live -view image, operation means, communication means, and when the live-view image is generated by the generation means, an external device is generated via the communication means. When a second request is received from the device, a process of generating a response from the live view image generated by the generating means, and transmitting the generated response as a response corresponding to the second request via the communication means transmitting the live view image to the external device, and if the live view image is not generated by the generating means and the second request is received from the external device via the communication means, an error is generated. performing a process of generating a response including information for notification, and a process of transmitting the generated response as a response corresponding to the second request to the external device via the communication means; a process of generating a response from the live view image generated by the generating means when a first request is received from the external device via the communication device, and the generated response as a response corresponding to the first request; transmitting to the external device via means, generating a response from the live view image generated by the generating means, and using the generated response as a response corresponding to the first request. If the live view image is not generated while the process of transmitting to the external device via the communication means is repeated, a predetermined image is used instead of the live view image that was not generated by the generating means. A control means for controlling to perform a process of generating a response and a process of transmitting the generated response to the external device via the communication means as a response corresponding to the first request .
本発明によれば、通信装置を制御するための対向アプリケーションを開発する際の実装負荷をより低減することができる。 According to the present invention, it is possible to further reduce the implementation load when developing a counterpart application for controlling a communication device.
以下、添付図面に従って本発明の実施形態を詳細に説明する。なお、以下に説明する実施形態は、本発明の実現手段としての一例であり、本発明が適用される装置の構成や各種条件によって適宜修正又は変更されてもよい。また、各実施形態を適宜組み合せることも可能である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The embodiments described below are examples of means for implementing the present invention, and may be appropriately modified or changed according to the configuration of the apparatus to which the present invention is applied and various conditions. Moreover, it is also possible to combine each embodiment suitably.
[第1の実施形態]
<デジタルカメラ100の構成>
図1(a)は、本実施形態が適用する通信装置の一例であるデジタルカメラ100の構成例を示すブロック図である。なお、ここでは通信装置の一例としてデジタルカメラについて述べるが、通信装置はこれに限られない。例えば通信装置は携帯型のメディアプレーヤや、いわゆるタブレットデバイス、パーソナルコンピュータなどの情報処理装置であってもよい。
[First embodiment]
<Configuration of
FIG. 1A is a block diagram showing a configuration example of a
制御部101は、入力された信号や、後述のプログラムに従ってデジタルカメラ100の各部を制御する。なお、制御部101が装置全体を制御する代わりに、複数のハードウェアが処理を分担することで、装置全体を制御してもよい。
The
撮像部102は、例えば、光学レンズユニットと絞り・ズーム・フォーカスなど制御する光学系と、光学レンズユニットを経て導入された光(映像)を電気的な映像信号に変換するための撮像素子などで構成される。撮像素子としては、一般的には、CMOS(Complementary Metal Oxide Semiconductor)や、CCD(Charge Coupled Device)が利用される。撮像部102は、制御部101に制御されることにより、撮像部102に含まれるレンズで結像された被写体光を撮像素子により電気信号に変換し、ノイズ低減処理などを行い、デジタルデータを画像データとして出力する。本実施形態のデジタルカメラ100では、画像データは制御部101による符号化が行われ、DCF(Design Rule for Camera File system)の規格に従って、記録媒体110にファイルとして記録される。
The
不揮発性メモリ103は、電気的に消去・記録可能な不揮発性のメモリであり、制御部101で実行される後述のプログラム等が格納される。作業用メモリ104は、撮像部102で撮像された画像データを一時的に保持するバッファメモリや、表示部106の画像表示用メモリ、制御部101の作業領域等として使用される。
The
操作部105は、ユーザがデジタルカメラ100に対する指示をユーザから受け付けるために用いられる。操作部105は例えば、ユーザがデジタルカメラ100の電源のON/OFFを指示するための電源ボタンや、撮影を指示するためのレリーズスイッチ、画像データの再生を指示するための再生ボタンを含む。さらに、後述の通信部111を介して外部機器との通信を開始するための専用の接続ボタンなどの操作部材を含む。また、後述する表示部106に形成されるタッチパネルも操作部105に含まれる。なお、レリーズスイッチは、押下状態を2段階で検出するためにSW1およびSW2を有する。レリーズスイッチが、いわゆる半押し状態となることにより、SW1がONとなる。これにより、AF(オートフォーカス)処理、AE(自動露出)処理、AWB(オートホワイトバランス)処理、EF(フラッシュプリ発光)処理等の撮影準備を行うための指示を受け付ける。また、レリーズスイッチが、いわゆる全押し状態となることにより、SW2がONとなる。これにより、撮影を行うための指示を受け付ける。
The
表示部106は、撮影の際のビューファインダー画像の表示、撮影した画像データの表示、対話的な操作のための文字表示などを行う。なお、表示部106は必ずしもデジタルカメラ100が内蔵する必要はない。デジタルカメラ100は内部又は外部の表示部106と接続することができ、表示部106の表示を制御する表示制御機能を少なくとも有していればよい。なお、操作部105及び表示部106で、デジタルカメラのユーザインターフェースを構成することになる。
A
記録媒体110は、撮像部102から出力された画像データのファイルを記録することができる。記録媒体110は、デジタルカメラ100に着脱可能なよう構成してもよいし、デジタルカメラ100に内蔵されていてもよい。すなわち、デジタルカメラ100は少なくとも記録媒体110にアクセスする手段を有していればよい。
The
通信部111は、外部装置と接続するためのインターフェイスである。本実施形態のデジタルカメラ100は、通信部111を介して、外部装置とデータのやりとりを行うことができる。例えば、撮像部102で生成した画像データを、通信部111を介して外部装置に送信することができる。なお、本実施形態では、通信部111は外部装置とIEEE802.11の規格に従った、いわゆる無線LANで通信するためのインターフェイスを含む。制御部101は、通信部111を制御することで外部装置との無線通信を実現する。なお、通信方式は無線LANに限定されるものではなく、例えば赤外線通信方式、Bluetooth(登録商標)通信方式、WirelessUSB等の無線通信方式などを含むことができる。さらには、USBケーブルやHDMI(登録商標)、IEEE1394、Ethernetなど、有線接続を採用してもよい。
The communication unit 111 is an interface for connecting with an external device. The
近距離通信部112は、例えば無線通信のためのアンテナと無線信号を処理するため変復調回路や通信コントローラから構成される。近距離通信部112は、変調した無線信号をアンテナから出力し、またアンテナで受信した無線信号を復調することでISO/IEC 18092の規格(いわゆるNFC:Near Field Communication)に従った近距離通信を実現する。またその他、赤外線通信方式、Bluetooth(登録商標)通信方式、WirelessUSB等の無線通信方式などに従った短距離無線通信を実現する。本実施形態の近距離通信部112は、デジタルカメラ100の側部に配さる。
The short-
本実施形態において、後述するスマートデバイス200とは、通信部より通信を開始して接続される。また、本実施形態におけるデジタルカメラ100の通信部111は、インフラストラクチャモードにおけるアクセスポイントとして動作するAPモードと、インフラストラクチャモードにおけるクライアントとして動作するCLモードとを有している。そして、通信部111をCLモードで動作させることにより、本実施形態におけるデジタルカメラ100は、インフラストラクチャモードにおけるCL機器として動作することが可能である。デジタルカメラ100がCL機器として動作する場合、周辺のAP機器に接続することで、AP機器が形成するネットワークに参加することが可能である。また、通信部111をAPモードで動作させることにより、本実施形態におけるデジタルカメラ100は、APの一種ではあるが、より機能が限定された簡易的なAP(以下、簡易AP)として動作することも可能である。デジタルカメラ100が簡易APとして動作すると、デジタルカメラ100は自身でネットワークを形成する。デジタルカメラ100の周辺の装置は、デジタルカメラ100をAP機器と認識し、デジタルカメラ100が形成したネットワークに参加することが可能となる。上記のようにデジタルカメラ100を動作させるためのプログラムは不揮発性メモリ103に保持されているものであり、APモード、CLモードを、ユーザが操作部105を操作して選択することになる。
In this embodiment, the smart device 200 (to be described later) is connected to the
なお、本実施形態におけるデジタルカメラ100はAPの一種であるものの、CL機器から受信したデータをインターネットプロバイダなどに転送するゲートウェイ機能は有していない簡易APである。したがって、自機が形成したネットワークに参加している他の装置からデータを受信しても、それをインターネットなどのネットワークに転送することはできない。
Although the
次に、デジタルカメラ100の外観について説明する。図1(b)、図1(c)はデジタルカメラ100の外観正面、背面の一例を示す図である。レリーズスイッチ105aや再生ボタン105b、方向キー105c、タッチパネル105dは、前述の操作部105に含まれる操作部材である。また、表示部106には、撮像部102による撮像の結果得られた画像が表示される。以上、実施形態におけるデジタルカメラ100の構成を説明した。
Next, the appearance of the
<スマートデバイス200の内部構成>
図2は、本実施形態のデジタルカメラ100と通信する情報処理装置の一例であるスマートデバイス200の構成例を示すブロック図である。なお、スマートデバイスとはスマートフォンやタブレットデバイス等の携帯端末を意味する。また、ここでは情報処理装置の一例としてスマートデバイスについて述べるが、情報処理装置はこれに限られない。例えば情報処理装置は、無線機能付きのデジタルカメラやプリンタ、テレビ、あるいはパーソナルコンピュータなどであってもよい。
<Internal Configuration of
FIG. 2 is a block diagram showing an example configuration of a
制御部201は、入力された信号や、後述のプログラムに従ってスマートデバイス200の各部を制御する。なお、制御部201が装置全体を制御する代わりに、複数のハードウェアが処理を分担することで、装置全体を制御してもよい。
The
撮像部202は、撮像部202に含まれるレンズで結像された被写体光を電気信号に変換し、ノイズ低減処理などを行い、デジタルデータを画像データとして出力する。撮像した画像データはバッファメモリに蓄えられた後、制御部201にて所定の演算や符号化処理が施され、記録媒体210にファイルとして記録される。
The imaging unit 202 converts subject light imaged by a lens included in the imaging unit 202 into an electrical signal, performs noise reduction processing and the like, and outputs digital data as image data. After the captured image data is stored in the buffer memory, the
不揮発性メモリ203は、電気的に消去・記録可能な不揮発性のメモリである。不揮発性メモリ203には、制御部201が実行する基本的なソフトウェアであるOS(オペレーティングシステム)や、このOSと協働して応用的な機能を実現するアプリケーションが記録されている。また、本実施形態では、不揮発性メモリ203には、デジタルカメラ100と通信するためのアプリケーション(以下アプリ)が格納されている。
The
作業用メモリ204は、表示部206の画像表示用メモリや、制御部201の作業領域等として使用される。操作部205は、スマートデバイス200に対する指示をユーザから受け付けるために用いられる。操作部205は例えば、ユーザがスマートデバイス200の電源のON/OFFを指示するための電源ボタンや、表示部206に形成されるタッチパネルなどの操作部材を含む。表示部206は、画像データの表示、対話的な操作のための文字表示などを行う。なお、表示部206は必ずしもスマートデバイス200が備える必要はない。スマートデバイス200は表示部206と接続することができ、表示部206の表示を制御する表示制御機能を少なくとも有していればよい。なお、操作部205及び表示部206で、スマートデバイス200のユーザインターフェースを構成することになる。
The
記録媒体210は、撮像部202から出力された画像データを記録することができる。記録媒体210は、スマートデバイス200に着脱可能なよう構成してもよいし、スマートデバイス200に内蔵されていてもよい。すなわち、スマートデバイス200は少なくとも記録媒体210にアクセスする手段を有していればよい。
The
通信部211は、外部装置と接続するためのインターフェイスである。本実施形態のスマートデバイス200は、通信部211を介して、デジタルカメラ100とデータのやりとりを行うことができる。本実施形態では、通信部211はアンテナであり、制御部101は、アンテナを介して、デジタルカメラ100と接続することができる。なお、デジタルカメラ100との接続では、直接接続してもよいしアクセスポイントを介して接続してもよい。データを通信するためのプロトコルとしては、例えばHTTP(Hyper Text Transfer Protocol)である。その他、無線LANを通じたPTP/IP(Picture Transfer Protocol over Internet Protocol)を用いることもできる。なお、デジタルカメラ100との通信はこれに限られるものではない。例えば、通信部211は、赤外線通信モジュール、Bluetooth(登録商標)通信モジュール、WirelessUSB等の無線通信モジュールを含むことができる。さらには、USBケーブルやHDMI、IEEE1394、Ethernetなど、有線接続を採用してもよい。
A communication unit 211 is an interface for connecting with an external device. The
近距離無線通信部212は、他機との非接触近距離通信を実現するための通信ユニットである。近距離無線通信部212は、無線通信のためのアンテナと無線信号を処理するための変復調回路や通信コントローラから構成される。近距離無線通信部212は、変調した無線信号をアンテナから出力し、またアンテナで受信した無線信号を復調することにより非接触近距離通信を実現する。ここでは、ISO/IEC 18092の規格(いわゆるNFC)に従った非接触通信を実現する。近距離無線通信部212は、他のデバイスからデータ読み出し要求を受けると、不揮発性メモリ203に格納されているデータに基づき、応答データを出力する。
The short-range wireless communication unit 212 is a communication unit for realizing non-contact short-range communication with other devices. The short-range wireless communication unit 212 includes an antenna for wireless communication, a modulation/demodulation circuit for processing wireless signals, and a communication controller. The short-range wireless communication unit 212 realizes non-contact short-range communication by outputting a modulated wireless signal from an antenna and demodulating a wireless signal received by the antenna. Here, contactless communication according to the ISO/IEC 18092 standard (so-called NFC) is realized. Upon receiving a data read request from another device, the short-range wireless communication unit 212 outputs response data based on the data stored in the
公衆網通信部213は、公衆無線通信を行う際に用いられるインターフェイスである。スマートデバイス200は、公衆網通信部213を介して、他の機器と通話することができる。この際、制御部201はマイク214およびスピーカ215を介して音声信号の入力と出力を行うことで、通話を実現する。本実施形態では、公衆網通信部213はアンテナであり、制御部101は、アンテナを介して、公衆網に接続することができる。なお、通信部211および公衆網通信部213は、一つのアンテナで兼用することも可能である。以上、実施形態におけるスマートデバイス200を説明した。
The public network communication unit 213 is an interface used for public wireless communication. The
<システム構成>
図3は、スマートデバイス200がネットワークを通じてデジタルカメラ100の通信APIを利用し、デジタルカメラ100を制御するためのシステム構成を示す図である。
<System configuration>
FIG. 3 is a diagram showing a system configuration for controlling the
通信APIを利用しデジタルカメラ100を制御するためのシステム構成は3種類ある。
There are three types of system configurations for controlling the
最初に、通信301に示すように、デジタルカメラ100とスマートデバイス200Aがピア・ツー・ピアで接続する構成である。この時デジタルカメラ100はWi-FiアクセスポイントとなってLAN(Local Area Network)を構築する。スマートデバイス200AはWi-Fiクライアントとなりデジタルカメラ100が構築したLANにジョインする。なお、本実施例においては通信301がWi-Fiで接続されている例をあげたが、Ethernetなどのような有線接続であってもよい。
First, as shown in
次に、ネットワークルータ302、通信303、304に示すように、デジタルカメラ100とスマートデバイス200Aが、ネットワークルータ302を経由して接続する構成である。この時ネットワークルータがWi-FiアクセスポイントとなってLANを構築する。デジタルカメラ100とスマートデバイス200AはWi-Fiクライアントとなり、ネットワークルータ302が構築したLANにジョインする。なお本実施例においては、通信303、304がWi-Fiで接続されている例をあげたが、Ethernetなどのような有線接続であってもよい。
Next, as shown by a
最後に、ネットワークルータ302、通信303、公衆回線305に示すように、スマートデバイス200Bが公衆回線305を経由してデジタルカメラ100と接続する構成である。前述の2つのシステム構成では、同一LAN内での接続の構成となる。一方、この構成では、スマートデバイス200Bは例えばVPN(Virtual Private Network)を使用することで、インターネットを通じ、LANの外側の離れた場所からデジタルカメラ100と通信することが可能である。なお、VPNは公知の技術であるため、ここでは説明を割愛する。
Finally, as shown by a
以上の3種類のシステム構成において、スマートデバイス200はデジタルカメラ100の通信APIを利用できる。
In the three types of system configurations described above, the
<デジタルカメラ100が公開する通信APIの基本構成>
図4、図5は、スマートデバイス200などの外部機器からデジタルカメラ100を制御するための通信APIの構成を示す図である。
<Basic Configuration of Communication API Published by
4 and 5 are diagrams showing the configuration of a communication API for controlling the
デジタルカメラ100は、スマートデバイス200などの外部機器からデジタルカメラ100を制御するための通信APIを公開している。このAPIを用いて要求を受け付けることで、本実施形態のデジタルカメラ100は、不揮発性メモリ103に記録されたデバイス情報や、記録媒体110などに保存されたコンテンツファイルを、通信部111を介して外部機器へ送信する。コンテンツファイルとは、デジタルカメラ100が生成して記録媒体110や不揮発性メモリ103に保存する画像ファイルのことであり、本実施形態では、撮像した静止画ファイルや動画ファイルのことを指す。
The
この通信APIに対応するプログラムは、予め不揮発性メモリ103に保存されている。制御部101は、通信部111を介して外部機器との通信が確立すると、通信APIに対応するプログラムを作業用メモリ104に展開し、外部装置からの通信APIを用いたリクエストを待つ。制御部101が外部機器から通信APIを用いたリクエストを検知すると、通信APIの種類に応じた処理を実行し、その結果をレスポンスとして外部機器に返却する。なお、通信APIに対応するプログラムはデジタルカメラ100が規定した通信プロトコル上で実行され、外部機器は規定された通信プロトコルを用いてデジタルカメラ100と通信を行い、通信APIを用いてリクエストする。本実施形態では、HTTP(Hyper Text Transfer Protocol)上で本通信APIに対応するプログラムが実行される。すなわち、デジタルカメラ100はHTTPサーバとして機能する。すなわち、本実施形態では、通信APIをWebAPIとして実装する場合を例に挙げて説明する。
A program corresponding to this communication API is stored in the
なお、通信プロトコルは、HTTPに限るものではなく、他のプロトコルであっても構わない。また、HTTPプロトコル自体は広く利用されているものであるので、ここでの説明は割愛する。 Note that the communication protocol is not limited to HTTP, and other protocols may be used. Further, since the HTTP protocol itself is widely used, its explanation is omitted here.
HTTPにおける通信APIに対応するプログラムの実行方法については、以下の手順で実現される。 A method of executing a program corresponding to the communication API in HTTP is realized by the following procedure.
まず、外部機器が通信APIとして公開されるURLに対して、HTTPリクエストボディにアクセス先の通信APIの仕様に応じた必要な指示情報をテキストデータで記述する。そして、HTTPメソッドであるGET(取得)、POST(生成)、PUT(更新)、DELETE(削除)の4メソッドのいずれかを用いてデジタルカメラ100に送信する。
First, the external device describes necessary instruction information according to the specifications of the communication API to be accessed in the HTTP request body as text data for the URL published as the communication API. Then, it transmits to the
これを受けたデジタルカメラ100はURLとHTTPメソッドとHTTPリクエストボディの指示情報の内容に基づいて処理を行い、その結果をHTTPレスポンスヘッダと共にHTTPレスポンスボディに付加して、外部機器に返却する。以上の手順で実現される。なお、HTTPレスポンスヘッダはHTTPステータスコードを含むとする。
The
また、通信APIにおいて、HTTPリクエストボディとHTTPレスポンスボディに記述するデータは、データ記述言語の1つであるJSON(JavaScript(登録商標) Object Notation)によって表現される。各通信APIには、それぞれの機能に応じたJSON構文の仕様が規定されており、デジタルカメラ100やスマートデバイス200は、それに則ってリクエストの指示やレスポンスの解析を行う。
In the communication API, the data described in the HTTP request body and HTTP response body are expressed in JSON (Javascript (registered trademark) Object Notation), which is one of the data description languages. For each communication API, JSON syntax specifications are defined according to their respective functions, and the
なお、本実施例ではJSONを用いているが、XML(Extensible Markup Language)であってもよいし、独自フォーマットで定義されたテキストデータやバイナリデータを用いてもよい。 Although JSON is used in this embodiment, XML (Extensible Markup Language) may be used, or text data or binary data defined in a unique format may be used.
次に、通信APIの構成を詳細に説明する。 Next, the configuration of the communication API will be described in detail.
以下の説明では、説明を簡単にするために、インターフェイスそのものだけでなく、通信APIに対応するサービスやそれを実現するプログラムも、単にAPIや通信APIとも記載する。すなわち、APIに対応するサービスを実現するプログラムを実行することをAPIを実行する、などと記載し、APIを介して対応するサービスの実行をリクエストすることをAPIをリクエストする、などと記載する。 In the following description, to simplify the description, not only the interface itself but also the service corresponding to the communication API and the program that implements it will be simply referred to as the API or the communication API. That is, executing a program that implements a service corresponding to an API is described as executing the API, and requesting execution of the corresponding service via the API is described as requesting the API.
図4は、通信APIの基本構成を説明する図である。 FIG. 4 is a diagram for explaining the basic configuration of the communication API.
まず、本実施形態における通信APIで使用するHTTPメソッドについて説明する。本実施形態における通信APIで使用するHTTPメソッドは、GET401、POST402、PUT403、DELETE404の4種類のみである。HTTPの規格としては他のメソッドも存在するが、取得、生成、更新、削除といった、ほとんど全てのコンピュータソフトウェアが持つ永続的な4つの基本機能に限定している。なお、本通信APIにおける4メソッドのそれぞれの意味は以下の通りである。 First, the HTTP method used in the communication API in this embodiment will be described. HTTP methods used in the communication API in this embodiment are only four types of GET401, POST402, PUT403, and DELETE404. Other methods exist as part of the HTTP standard, but they are limited to four basic persistent functions that almost all computer software has: get, create, update, and delete. The meaning of each of the four methods in this communication API is as follows.
GET401は、コンテンツ(画像ファイル)の取得、カメラの情報や状態の取得、設定項目の能力値や設定値を取得する場合に使用する。
POST402は、外部装置からデジタルカメラ100に対してコンテンツファイルなどデータの保存、撮影の実行やズーム操作など、カメラの機能を実行する場合に使用する。
The
PUT403は、デジタルカメラ100のメニュー設定や撮影パラメータ設定など、設定値を変更する場合に使用する。
A
DELETE404は、コンテンツの削除や、設定値を初期化する場合に使用する。 DELETE 404 is used to delete content or initialize setting values.
上記4メソッドに絞ることで、複雑なHTTPメソッドの制御を必要としない。そのため、デジタルカメラ100を制御するためのスマートデバイス200の制御プログラムを作成するプログラマは、最低限かつ頻繁に活用するHTTPメソッドを使用するだけでプログラムを作成することができる。
By narrowing down to the above four methods, complicated HTTP method control is not required. Therefore, a programmer who creates a control program for the
次に、本実施形態における通信APIのトップURLについて説明する。トップURLとは、クライアントがデジタルカメラ100をコントロールする際に、最初にアクセスするURLとして規定されるURLである。コントローラは必ずこのトップURLにアクセスしてから、カメラのリモートコントロールのための他のAPIを利用する必要がある。
Next, the top URL of the communication API in this embodiment will be explained. The top URL is a URL defined as the first URL accessed when the client controls the
図4のURL405は通信APIのトップURLである。トップURLのホスト名、ドメイン名は、デジタルカメラ100に割り当てられたIPアドレスとポート番号で構成される。それに続き、通信APIを示すディレクトリ、さらに通信APIのバージョンを示すディレクトリがその後に続く構成になっている。例えば、デジタルカメラ100に割り振られたIPアドレスが192.168.1.1であり、ポート番号が8080であった場合のトップURLは、
http://192.168.1.1:8080/api/ver1
となる。
A
http://192.168.1.1:8080/api/ver1
becomes.
HTTPクライアントであるスマートデバイス200が、HTTPサーバであるデジタルカメラ100が公開する通信APIのトップURLをGET401でリクエストすると、デジタルカメラ100はAPI406に示すレスポンスボディ(JSON)を返す。ここには、デジタルカメラ100が対応している通信APIの一覧が記述されている。なお特徴的なのは、各URLに対して、どのHTTPメソッドが対応しているかがわかるJSON構文になっている点である。トップURLにアクセスすることで、スマートデバイス200は、デジタルカメラ100が対応している通信APIの種類を知ることができる。
When the
次に、API表407は通信APIのカテゴリを示す表である。本実施形態における通信APIは、機能の種類によってURLを複数のカテゴリに分類していることを示している。なお、表におけるAPIカテゴリのURL表記は、トップURLを省略した表記になっている。実際には、APIカテゴリ408は、
http://192.168.1.1:8080/api/ver1/deviceinformation
となる。
Next, an API table 407 is a table showing communication API categories. The communication API in this embodiment classifies URLs into a plurality of categories according to the types of functions. Note that the URL notation of the API category in the table is a notation that omits the top URL. In practice, the
http://192.168.1.1:8080/api/ver1/device information
becomes.
次に、通信APIの機能のカテゴライズについて説明する。まず、APIカテゴリ408は、デジタルカメラ100の固定情報を取得するカテゴリである。次に、APIカテゴリ409は、デジタルカメラ100の状態情報を取得するカテゴリである。次に、APIカテゴリ410は、デジタルカメラ100のメニュー設定の取得や変更、メニュー機能を実行するカテゴリである。次に、APIカテゴリ411は、デジタルカメラ100の撮影機能を実行するカテゴリである。次に、APIカテゴリ412は、デジタルカメラ100の撮影パラメータの設定を取得、変更するカテゴリである。次に、APIカテゴリ413は、デジタルカメラ100が出力するスルー画を取得するカテゴリである。次に、APIカテゴリ414は、デジタルカメラ100が発行するイベント情報を取得するカテゴリである。次に、APIカテゴリ415は、デジタルカメラ100に装着されたメディアに保存されたコンテンツを取得するカテゴリである。
Next, categorization of communication API functions will be described. First, an
以上のように通信APIがURLでカテゴライズされることにより、デジタルカメラ100を制御するためのスマートデバイス200の制御プログラムを作成するプログラマは、実行したい通信APIがどのURLにあるのかが一目瞭然になるのが特徴である。
By categorizing the communication APIs by URL as described above, the programmer who creates the control program for the
なお、個々の通信APIは、上記のAPIカテゴリ以下のディレクトリにURLが規定されている。 For each communication API, the URL is specified in the directory below the above API category.
以上が、APIの基本的な構成の説明である。 The above is the description of the basic configuration of the API.
続いて、本実施形態における特徴となるデジタルカメラ100のスルー画を取得するAPIについて説明する。
Next, an API for acquiring a through image of the
<デジタルカメラ100のスルー画を取得するAPI>
図5のAPI表500は、デジタルカメラ100のスルー画(リモート用ライブビュー画像)を取得するAPI群を示した表であり、図4のAPIカテゴリ413に属するAPIを示す。
<API for Acquiring Through Image of
An API table 500 in FIG. 5 is a table showing an API group for acquiring a through image (remote live view image) of the
API501は、デジタルカメラ100のスルー画の生成の開始と終了を指示するAPIである。リクエストボディにスルー画のサイズとデジタルカメラ100の表示部106にスルー画を表示するか否かの指示を記述して本APIをPOST402で実行すると、デジタルカメラ100は指示された内容に従ってスルー画の生成を開始および停止する。
The
API502は、デジタルカメラ100のスルー画を1フレーム取得するAPIである。本APIをGET401で実行すると、API501で設定したスルー画を1フレーム取得できる。
An
API503は、デジタルカメラ100のスルー画をチャンク送信で取得するAPIである。チャンク送信(Chunked Transfer)とは、HTTP1.1(RFC2616)で定義されているデータ転送メカニズムの1つである。チャンク送信は、事前にレスポンスのデータ全体のサイズが不明であっても、データの塊(ブロック)ごとにサイズを記してレスポンスを返していく送信方法である。API503はAPI502と比べて、データ容量の合計がわからない場合やデータを連続して取得する場合等に効果的である。詳細なメカニズムについては公知の技術であるためここでの説明は割愛する。本APIをGET401で実行すると、API表500に示すように、スルー画のサイズ情報、スルー画の実データの順でスルー画が送信され続ける。本実施形態では、スルー画は1フレームずつスマートデバイス200に送信されているとする。また、本APIをDELETE404で実行すると、API表500の最後の行に示すように、デジタルカメラ100はスルー画のサイズ情報が0と送信し、スルー画のチャンク送信を停止する。
The
ここで、デジタルカメラ100に何らかのエラーが発生し、スルー画を生成できない場合について説明する。対向機がデジタルカメラ100に対してAPI502を実行した場合、デジタルカメラ100はリクエストに対するレスポンスとしてスルー画を1フレーム送信する。そのため、ライブビュー中に、例えばデジタルカメラ100に何らかのエラーが発生している場合、デジタルカメラ100はHTTPレスポンスヘッダにそのエラーであることを示す情報を格納することで、対向機にエラーが発生していることを通知できる。さらに、HTTPレスポンスヘッダにエラーであることを示すためのコードがHTTPの規格に定義されている。また、HTTPレスポンスヘッダはHTTP通信では必ず参照する。これによりスマートデバイス200はHTTPレスポンスヘッダを参照することで、デジタルカメラ100のエラーが発生したか否かを特別なアルゴリズムを必要することなく判定できる。
Here, a case where some error occurs in the
これに対して、対向機がデジタルカメラ100に対してAPI503を実行した場合、デジタルカメラ100はリクエストに対するレスポンスとして、HTTPレスポンスヘッダを送信後にHTTPレスポンスボディとしてスルー画を連続して送信し続ける。チャンク送信方式ではスルー画を送信している途中に、デジタルカメラ100はHTTPレスポンスヘッダを送信することはできない。そのため、ライブビュー中に、デジタルカメラ100に何らかのエラーが発生した場合でも、デジタルカメラ100はHTTPレスポンスヘッダではそのエラーの内容を通知することはできない。また、一つの解決方法として、HTTPレスポンスボディまたはスルー画のデータ構造にエラーの内容を含めるためのデータ領域を作成し、対向機がそのデータ領域を解析するという方法がある。しかしながら、この方法だと対向機はHTTPレスポンスボディまたはスルー画を解析する必要がある。そのため対向機でHTTPレスポンスボディ(スルー画)を解析する方法は、対向アプリケーションを開発する際の実装負荷を増加させる。
On the other hand, when the counterpart device executes the
本実施形態では、チャンク送信方式でも、対向機であるスマートデバイス200がHTTPレスポンスボディまたはスルー画を解析することなく、デジタルカメラ100はスルー画を生成できないことを対向機のユーザに通知する。このために、本実施形態におけるチャンク送信ではデジタルカメラ100はスルー画を生成できない場合、ダミー画像を送信する。
In this embodiment, even with the chunk transmission method, the
<本実施形態におけるスルー画を1フレームずつ取得する方法の説明>
まず、チャンク送信に対してスルー画を1フレームずつ取得する方法について説明する。図6Aは、図5に示す通信API502を実行した際の処理の流れを示すシーケンス図の一例である。図7A(a)~(b)はライブビュー中のスマートデバイス200のUI画面の一例を示した図である。
<Description of method for acquiring through-the-lens image frame by frame in this embodiment>
First, a method of acquiring a through image frame by frame for chunk transmission will be described. FIG. 6A is an example of a sequence diagram showing the flow of processing when the
図6AのステップS601A、S602Aは、API501を実行した際のシーケンスである。図6AのステップS603A、S604A、S605A、S606A、S607AはAPI502を実行した際のシーケンスである。
Steps S601A and S602A in FIG. 6A are the sequence when the
ステップS601Aにて、スマートデバイス200の制御部201は、プログラム処理により作業用メモリ204に記録されたスルー画の生成を開始するための値を取得する。そして制御部201は、スルー画の生成を開始するための値をリクエスト用JSON構文に基づいたデータセットに成形してHTTPリクエストボディに記述し、通信部211を介してデジタルカメラ100にAPI501をPOST402でリクエストする。なお本ステップにおいて、制御部201はAPI501の仕様に則り、スルー画のサイズ情報、およびデジタルカメラ100の表示部106にスルー画を表示するか否かを指示している。デジタルカメラ100の制御部101が通信部111を介して、このリクエストを受信したことを検知すると、リクエストボディに記述されたJSON構文を解析する。そして、制御部101はスマートデバイス200によってリクエストされたスルー画のサイズおよびデジタルカメラ100の表示部106にスルー画を表示するか否かの指示に従って、スルー画の生成処理を開始する。制御部101は生成されたスルー画を、逐次一時的に作業用メモリ104に記録する。
In step S601A, the
ステップS602Aにて、デジタルカメラ100の制御部101は、レスポンスの値をJSON構文に基づいたデータセットに成形してHTTPレスポンスボディに記述し、レスポンスとして通信部111を介してスマートデバイス200に送信する。
In step S<b>602</b>A, the
ステップS603Aにて、スマートデバイス200の制御部201は、通信部211を介してデジタルカメラ100にAPI502をGET401でリクエストする。
In step S<b>603</b>A, the
ステップS604Aにて、デジタルカメラ100の制御部101が通信部111を介して、このリクエストを受信したことを検知すると、作業用メモリ104より逐次一時的に記録されるスルー画を取得し、レスポンス用データセットに成形する。そして、制御部101は成形したデータセットをHTTPレスポンスボディに記述し、通信部111を介してスマートデバイス200に送信する。
In step S604A, upon detecting that the
なお、スマートデバイス200より繰り返しAPI502が実行され、スマートデバイス200上でのライブビュー表示を実現する。例えば、図7A(a)の画面701Aに示すように、ライブビュー表示はスマートデバイス200の表示部206に表示される。
Note that the
ここで、デジタルカメラ100の制御部101がスルー画を生成できない場合(スルー画生成不可区間690)について説明する。たとえば、表示部106に撮影パラメータの設定を変更するためのメニューを表示している場合、および作業用メモリ104にスルー画を保持できる容量がない場合、デジタルカメラ100の制御部101はスルー画を生成しない。他にも、たとえば、記録媒体110に保存している画像の現像処理などをおこなっている場合、およびその他スルー画の生成を阻害する処理が実行されている場合も、デジタルカメラ100の制御部101はスルー画を生成できない。
Here, a case where the
ステップS605Aにて、スマートデバイス200の制御部201は、通信部211を介してデジタルカメラ100にAPI502をGET401でリクエストする。
In step S<b>605</b>A, the
ステップS606Aにて、デジタルカメラ100の制御部101が通信部111を介してこのリクエストを受信したことを検知すると、スルー画を生成できないことを記述したエラーメッセージを含むレスポンス用データセットを成形する。そして、制御部101は成形したデータセットをレスポンスボディに記述し、通信部111を介してスマートデバイス200に送信する。スマートデバイス200の制御部201はエラーメッセージを受信した場合、HTTPレスポンスヘッダを参照することで、デジタルカメラ100にエラーが発生していることを判定する。そして制御部201は、必要に応じて、HTTPレスポンスボディを参照し、エラーの内容等を取得する。このとき、スマートデバイス200の制御部201は図7A(b)に示すように、メッセージ704Aを表示部206に表示する。本実施形態において、制御部201は図7A(b)の画面703Aに示すように、スルー画生成不可区間690より前に取得したスルー画を表示する。このスルー画はスマートデバイス200の作業用メモリ204に保持されている。本実施形態ではスマートデバイス200は上記のようにエラーメッセージとスルー画の表示を行ったが、これに限る必要はない。例えば、スマートデバイス200はメッセージ704Aを画面703Aに重畳して表示することで、エラー発生をユーザに報知してもよい。
In step S606A, when the
以上、スルー画を1フレームずつ取得する方法について説明した。 In the above, a method for acquiring a through image frame by frame has been described.
<本実施形態におけるチャンク送信の説明>
図6Bは、図5に示す通信API503を実行した際の処理の流れを示すシーケンス図の一例である。図7B(a)~(c)はライブビュー中のスマートデバイス200のUI画面の一例を示した図である。
<Description of chunk transmission in this embodiment>
FIG. 6B is an example of a sequence diagram showing the flow of processing when the
図6BのステップS601B、S602Bは、API501を実行した際のシーケンスである。図6BのステップS603B、S604B、S605B、S606B、S607BはAPI503を実行した際のシーケンスである。
Steps S601B and S602B in FIG. 6B are sequences when the
ステップS601Bにて、スマートデバイス200の制御部201は、プログラム処理により作業用メモリ204に記録されたスルー画の生成を開始するための値を取得する。そして制御部201は、スルー画の生成を開始するための値をリクエスト用JSON構文に基づいたデータセットに成形してHTTPリクエストボディに記述し、通信部211を介してデジタルカメラ100にAPI501をPOST402でリクエストする。なお本ステップにおいて、制御部201はAPI501の仕様に則り、スルー画のサイズ情報、およびデジタルカメラ100の表示部106にスルー画を表示するか否かを指示している。デジタルカメラ100の制御部101が通信部111を介して、このリクエストを受信したことを検知すると、リクエストボディに記述されたJSON構文を解析する。そして、制御部101はスマートデバイス200によってリクエストされたスルー画のサイズおよびデジタルカメラ100の表示部106にスルー画を表示するか否かの指示に従って、スルー画の生成処理を開始する。制御部101は生成されたスルー画を、逐次一時的に作業用メモリ104に記録する。
In step S601B, the
ステップS602Bにて、デジタルカメラ100の制御部101は、レスポンスの値をJSON構文に基づいたデータセットに成形してHTTPレスポンスボディに記述し、レスポンスとして通信部111を介してスマートデバイス200に送信する。
In step S602B, the
ステップS603Bにて、スマートデバイス200の制御部201は、通信部211を介してデジタルカメラ100にAPI503をGET401でリクエストする。
In step S<b>603</b>B, the
ステップS604Bにて、デジタルカメラ100の制御部101は通信部111を介して、このリクエストを受信したことを検知した場合、作業用メモリ104からスルー画を読み込む。制御部101は取得したスルー画を、レスポンス用データセットに成形する。そして、制御部101は成形したデータセットをHTTPレスポンスボディに記述し、通信部111を介してスマートデバイス200に送信する。スマートデバイス200の制御部201は受信したスルー画を図7B(a)の画面701Bに示すように表示部206にライブビュー表示する。デジタルカメラ100の制御部101は作業用メモリ104に逐次一時的に記録したスルー画を順次スマートデバイス200に送信する。
In step S<b>604</b>B, when the
ここで、デジタルカメラ100の制御部101がスルー画を生成できない場合(スルー画生成不可区間690)について説明する。例えば、表示部106に撮影パラメータの設定を変更するためのメニューを表示している場合、および作業用メモリ104にスルー画を保持できる容量がない場合、デジタルカメラ100の制御部101はスルー画を生成できない。他にも、たとえば、記録媒体110に保存している画像の現像処理などを実行している場合、およびその他スルー画の生成を阻害する処理が実行している場合も、デジタルカメラ100の制御部101はスルー画を生成できない。なお、ここでデジタルカメラ100は表示部106に撮影パラメータの設定を変更するためのメニューを表示している場合は表示部106にメニューが表示されている。作業用メモリ104にスルー画を保持できる容量がない場合や記録媒体110に保存している画像の現像処理などを実行している場合等では、デジタルカメラ100は表示部106に、スルー画を生成できない旨の警告を表示する。
Here, a case where the
また、前述したように、API503を実行した場合、デジタルカメラ100はHTTPレスポンスヘッダを利用してエラーの内容をスマートデバイス200に送信することはできない。そこで、本実施形態ではデジタルカメラ100はエラーの内容を通知するためのダミー画像をスマートデバイス200に送信する。
Also, as described above, when the
ステップS605Bにて、デジタルカメラ100の制御部101はダミー画像を生成して、レスポンス用データセットに成形する。そして、制御部101は成形したデータセットをHTTPレスポンスボディに記述し、通信部111を介して、スマートデバイス200に送信する。例えば、デジタルカメラ100はダミー画像として、図7B(b)の画面702Bに示すようなエラーメッセージを記載した画像を生成する。これにより、スルー画生成不可区間690より前と同様に、デジタルカメラ100は送信した画像をスマートデバイス200の表示部206に表示させることでユーザにエラーの内容を通知できる。ここで、スマートデバイス200は受信したスルー画を解析していない。本実施形態では、ダミー画像がエラーメッセージを記載した画像としたがこれに限る必要はない。たとえば、ダミー画像として、単に黒く塗りつぶされただけの画像でもよい。また、本実施形態においてデジタルカメラ100の制御部101はダミー画像を、スルー画と同じ解像度および同じアスペクト比にして生成する。これにより、スマートデバイス200の制御部201は、ダミー画像を受信しても画角調整等の処理を追加することなく、スムーズに表示を切り替えることができる。これにより、スマートデバイス200の制御部201は、スルー画生成不可区間690においても、デジタルカメラ100から受信したデータセットを解析することや画像の画角調整等の特別な処理を行う必要がない。
In step S605B, the
ステップS606Bにて、スマートデバイス200の制御部201は、ライブビューを終了するために通信部211を介してデジタルカメラ100にAPI503をDELETE404でリクエストする。
In step S606B, the
ステップS607Bにて、デジタルカメラ100の制御部101は通信部111を介して、このリクエストを受信したことを検知すると、スルー画のサイズ情報を0としてレスポンス用データセットを成形する。そして、制御部101は成形したデータセットをレスポンスボディに記述し、通信部111を介してスマートデバイス200に送信する。このデータセットを受信したスマートデバイス200はライブビュー表示を終了する。これによってデジタルカメラ100およびスマートデバイス200間のチャンク送信処理が終了する。
In step S607B, when the
以上、本実施形態におけるチャンク送信について説明した。 The chunk transmission in this embodiment has been described above.
次に、本実施形態におけるデジタルカメラ100の動作の一例およびスマートデバイス200の動作の一例について説明する。
Next, an example of the operation of the
図6Cは本実施形態におけるデジタルカメラ100の動作の一例を示すフローチャートである。デジタルカメラ100の制御部101は通信部111を介して、スマートデバイス200からGET401でリクエストされたことを検知したことをトリガに本処理を開始する。
FIG. 6C is a flow chart showing an example of the operation of the
ステップS601Cにて、制御部101は受信したリクエストのAPIの種類について判定する。API502によってリクエストされたと判定した場合、スルー画を1フレーム送信するため制御部101はステップS606Cに遷移する。この場合は、図6AのステップS603Aに対応する。API503によってリクエストされたと判定した場合、チャンク送信によってスルー画を送信するため、制御部101はステップS602Cに遷移する。この場合は、図6BのステップS603Bに対応する。
In step S601C, the
ステップS602Cにて、制御部101はスルー画を作業用メモリ104から読みこみ、スルー画からレスポンス用データを作成し、作業用メモリ104に記録する。
In step S<b>602</b>C, the
ステップS603Cにて、制御部101は通信部111を介して、スマートデバイス200に作成したレスポンスデータを送信する。本ステップは、図6BのステップS604Bに対応する。
In step S<b>603</b>C, the
ステップS604Cにて、制御部101は通信部111を介して、スマートデバイス200からチャンク送信を終了する指示を受信したか否かを判定する。スマートデバイス200からチャンク送信を終了する指示を受信した場合、制御部101はステップS605Cに遷移する。スマートデバイス200からチャンク送信を終了する指示を受信していない場合、制御部101はステップS602Cに戻り、チャンク送信を継続する。
In step S<b>604</b>C, the
ステップS605Cにて、制御部101は通信部111を介してスマートデバイス200へチャンク送信を終了するためのレスポンス用データを送信する。
In step S<b>605</b>C, the
ステップS606Cにて、制御部101はスルー画を作業用メモリ104から読みこみ、スルー画からレスポンス用データを作成し、作業用メモリ104に記録する。
In step S<b>606</b>C, the
ステップS607Cにて、制御部101は通信部111を介して、スマートデバイス200に作成したレスポンスデータを送信する。本ステップは、エラーが発生していない場合、図6AのステップS604Aに対応する。
In step S<b>607</b>C, the
以上、本実施形態におけるデジタルカメラ100の動作の一例について説明した。
An example of the operation of the
次にスマートデバイス200の動作の一例について説明する。図6Dは本実施形態におけるスマートデバイス200の動作の一例を示すフローチャートである。スマートデバイス200の制御部201は通信部211を介してデジタルカメラ100にGET401でリクエストした場合、本処理を開始する。
Next, an example of the operation of
ステップS601Dにて、制御部201は送信したリクエストのAPIの種類について判定する。API502によってリクエストした場合、スルー画を1フレーム取得するため、制御部201はステップS607Dに遷移する。この場合は、図6AのステップS603Aに対応する。API503によってリクエストした場合、チャンク送信によってスルー画を取得するため、制御部201はステップS602Dに遷移する。この場合は、図6BのステップS603Bに対応する。
In step S601D, the
ステップS602Dにて、制御部201はレスポンス用データを受信したか否かを判定する。レスポンス用データを受信した場合、制御部201はステップS603Dに遷移する。レスポンス用データを受信していない場合、制御部201は本処理を繰り返す。本ステップは図6BのステップS604Dに対応する。
In step S602D, the
ステップS603Dにて、制御部201は受信したスルー画を表示部206に表示する。
In step S603D,
ステップS604Dにて、制御部201はチャンク送信を終了するか否かを判定する。例えば制御部201はユーザから操作部205(タッチパネル等)を介してライブビューを終了する指示を受け付けた場合チャンク送信を終了すると判定する。チャンク送信を終了する場合、制御部201はステップS605Dに遷移する。チャンク送信を終了しない場合、制御部201はステップS603Dに戻りチャンク送信を継続する。
In step S604D, the
ステップS605Dにて、制御部201は通信部211を介してチャンク送信を終了するための指示をデジタルカメラ100へ送信する。
In step S<b>605</b>D, the
ステップS606Dにて、制御部201は通信部211を介してチャンク送信を終了するためのレスポンス用データを受信したか否かを判定する。チャンク送信を終了するためのレスポンス用データを受信した場合、制御部201は処理を終了する。チャンク送信を終了するためのレスポンス用データを受信していない場合、制御部201は本ステップの処理を繰り返す。
In step S<b>606</b>D, the
ステップS607Dにて、スルー画を取得するため制御部201はレスポンス用データを受信したか否かを判定する。レスポンス用データを受信した場合、制御部201はステップS603Dに遷移する。レスポンス用データを受信していない場合、制御部201は本処理を繰り返す。本ステップは図6BのステップS604Dに対応する。
In step S607D, the
ステップS608Dにて、制御部201は受信したスルー画を表示部206に表示し、処理を終了する。
In step S608D, the
以上、スマートデバイス200の動作の一例について説明した。なお、本実施形態におけるAPI502によるライブビュー表示の場合、スマートデバイス200はスルー画を1フレーム取得した後自動的に再度API502をGET401でリクエストし、スルー画を1フレーム取得する処理を繰り返す。
An example of the operation of the
以下、本実施形態におけるチャンク送信について、対向機のアプリケーションの実装負荷の低減の効果について説明する。 The effect of reducing the implementation load of the application on the counterpart device with respect to chunk transmission according to the present embodiment will be described below.
<実施形態による対向機のアプリケーションの実装負荷の低減の効果>
ここでは従来の方法と本実施形態におけるチャンク送信とを比較することで、対向機のアプリケーションの実装負荷の低減の効果について説明する。まず従来のスルー画を1フレームずつ取得する方法および従来の本実施形態を利用しないチャンク送信についてその課題を説明し、その後本実施形態におけるチャンク送信についてその効果を説明する。
<Effect of Reduction of Implementation Load of Application on Counterpart Machine by Embodiment>
Here, by comparing the conventional method and the chunk transmission in this embodiment, the effect of reducing the implementation load of the application on the counterpart device will be described. First, problems of a conventional method of acquiring through-the-lens images frame by frame and chunk transmission that does not use the conventional embodiment will be described, and then the effects of chunk transmission in this embodiment will be described.
まず、本実施形態におけるスルー画を1フレームずつ取得する方法におけるデジタルカメラ100の動作の一例およびスマートデバイス200の動作の一例を説明する。図8Aは本実施形態におけるスルー画を1フレームずつ取得する場合におけるデジタルカメラ100の動作の一例を示すフローチャートである。デジタルカメラ100の制御部101は通信部111を介して、スマートデバイス200からAPI502をGET401でリクエストされたことを検知したことをトリガに本処理を開始する。このトリガは図6AのステップS603AおよびステップS605Aに対応する。
First, an example of the operation of the
ステップS801にて、制御部101はスルー画を生成できるか否かを判定する。スルー画を生成できない場合、制御部101はステップS802に遷移する。スルー画が生成できる場合、制御部101はステップS803に遷移する。
In step S801, the
ステップS802にて、制御部101はスルー画を生成できない原因であるエラーの内容を検知する。
In step S802, the
ステップS803にて、制御部101は、エラーが発生したことを通知するためのデータをHTTPレスポンスヘッダに記述してレスポンス用データを作成し、作業用メモリ104に記録する。ここで制御部101は、さらにエラーの具体的な内容をHTTPレスポンスボディに記述してレスポンス用データを作成してもよい。
In step S<b>803 , the
ステップS804にて、制御部101はスルー画を作業用メモリ104から読みこみ、スルー画からレスポンス用データを作成し、作業用メモリ104に記録する。
In step S<b>804 , the
ステップS805にて、制御部101は通信部111を介して、スマートデバイス200に作成したレスポンスデータを送信する。本ステップは、エラーが発生していない場合、図6AのステップS603Aに対応する。本ステップは、エラーが発生している場合、図6AのステップS606Aに対応する。
In step S<b>805 , the
以上、本実施形態におけるスルー画を1フレームずつ取得する場合におけるデジタルカメラ100の動作の一例について説明した。
An example of the operation of the
図8Bは本実施形態におけるスルー画を1フレームずつ取得する場合におけるスマートデバイス200のフローチャートの一例である。スマートデバイス200の制御部201は通信部211を介してデジタルカメラ100にAPI502をGET401でリクエストし、そのレスポンスとしてデジタルカメラ100からスルー画を受信した場合、本処理を開始する。このトリガは図6AのステップS604AおよびステップS606Aに対応する。
FIG. 8B is an example of a flowchart of the
ステップS851にて、制御部201は受信したレスポンス用データを解析し、エラーが発生したことを通知するためのデータが含まれているか否かを判定する。例えば制御部201はレスポンス用データのHTTPレスポンスヘッダにエラーが発生したことを通知するためのデータが含まれているか否かを判定する。レスポンス用データにエラーが発生したことを通知するためのデータが含まれていると判定した場合、制御部201はステップS852に遷移する。レスポンス用データにエラーが発生したことを通知するためのデータが含まれていないと判定した場合、制御部201はステップS853に遷移する。
In step S851, the
ステップS852にて、制御部201はステップS851において解析したエラーの内容を表示部206に表示する。例えば図7B(c)に示すように、制御部201は画面703Bに、スルー画生成不可区間690より前に受信したスルー画を表示する。このスルー画はスマートデバイス200の作業用メモリ204に保持されている。制御部201は画面703Bの下にエラーメッセージ704Bを表示する。他にも、例えば制御部201はエラーメッセージ704Bを画面702Bに重畳して表示することで、エラー発生をユーザに報知してもよい。このスルー画はスマートデバイス200の作業用メモリ204に保持されている。なお受信したレスポンス用データのHTTPレスポンスボディにエラーの詳細な内容が含まれていた場合、制御部201はその内容を表示部206に表示してもよい。
In step S852, the
ステップS853にて、解析の結果、受信したレスポンス用データにエラーが発生したことを通知するためのデータは含まれていないため、制御部201は受信したレスポンス用データに含まれるスルー画を表示する。
In step S853, as a result of the analysis, the received response data does not include data for notifying that an error has occurred, so the
以上、本実施形態におけるスルー画を1フレームずつ取得する場合におけるスマートデバイス200の動作の一例について説明した。このような場合、アプリケーションの実装において、デジタルカメラ100が送信したデータを毎回解析するアルゴリズムをスマートデバイス200は必要とする。
An example of the operation of the
次に本実施形態を利用しない従来のチャンク送信におけるデジタルカメラ100の動作の一例およびスマートデバイス200の動作の一例を説明する。図9Aは本実施形態を利用しない従来のチャンク送信におけるデジタルカメラ100の動作の一例を示すフローチャートである。デジタルカメラ100の制御部101は通信部111を介して、スマートデバイス200からAPI503をGET401でリクエストされたことを検知したことをトリガに本処理を開始する。このトリガは図6BのステップS603Bに対応する。
Next, an example of the operation of the
ステップS901にて、制御部101はスルー画を生成できるか否かを判定する。スルー画を生成できない場合、制御部101はステップS902に遷移する。スルー画が生成できる場合、制御部101はステップS903に遷移する。
In step S901, the
ステップS902にて、制御部101はスルー画を生成できない原因であるエラーの内容を検知する。
In step S<b>902 , the
ステップS903にて、制御部101は、エラーが発生したことを通知するためのデータをHTTPレスポンスボディに記述してレスポンス用データを作成し、作業用メモリ104に記録する。
In step S<b>903 , the
ステップS904にて、制御部101はスルー画を作業用メモリ104から読みこみ、スルー画からレスポンス用データを作成し、作業用メモリ104に記録する。
In step S<b>904 , the
ステップS905にて、制御部101は通信部111を介して、スマートデバイス200へ作成したレスポンス用データを送信する。
In step S<b>905 , the
ステップS906にて、制御部101は通信部111を介して、スマートデバイス200からチャンク送信を終了する指示を受信したか否かを判定する。スマートデバイス200からチャンク送信を終了する指示を受信した場合、制御部101はステップS907に遷移する。スマートデバイス200からチャンク送信を終了する指示を受信していない場合、制御部101はステップS901に戻り、本処理を繰り返す。
In step S<b>906 , the
ステップS907にて、制御部101は通信部111を介してスマートデバイス200へチャンク送信を終了するためのレスポンス用データを送信する。
In step S<b>907 , the
以上、本実施形態を利用しない場合のデジタルカメラ100の動作の一例について説明した。
An example of the operation of the
図9Bは本実施形態を利用しない従来のチャンク送信におけるスマートデバイス200のフローチャートの一例である。スマートデバイス200の制御部201は通信部211を介してデジタルカメラ100にAPI503をGET401でリクエストした場合、本処理を開始する。このトリガは図6BのステップS603Bに対応する。
FIG. 9B is an example of a flow chart of the
ステップS950にて、制御部201はレスポンス用データを受信したか否かを判定する。レスポンス用データを受信した場合、制御部201はステップS951に遷移する。レスポンス用データを受信していない場合、制御部201はステップS950を繰り返す。ただし、所定の時間以上レスポンス用データを受信していない場合、制御部201はデジタルカメラ100に何らかのエラーが発生したとして、表示部206にエラーを表示して処理を終了する。
In step S950, the
ステップS951にて、制御部201は受信したレスポンス用データを解析し、エラーが発生したことを通知するためのデータが含まれているか否かを判定する。レスポンス用データにエラーが発生したことを通知するためのデータが含まれていると判定した場合、制御部201はステップS952に遷移する。レスポンス用データにエラーが発生したことを通知するためのデータが含まれていないと判定した場合、制御部201はステップS953に遷移する。
In step S951, the
ステップS952にて、制御部201はステップS951において解析したエラーの内容を表示部206に表示する。例えば図7B(c)に示すように、制御部201は画面703Bに、スルー画生成不可区間690より前に受信したスルー画を表示する。このスルー画はスマートデバイス200の作業用メモリ204に保持されている。制御部201は画面703Bの下にエラーメッセージ704Bを表示する。他にも、例えば制御部201はエラーメッセージ704Bを画面702Bに重畳して表示することで、エラー発生をユーザに報知してもよい。このスルー画はスマートデバイス200の作業用メモリ204に保持されている。
In step S952, the
ステップS953にて、解析の結果、受信したレスポンス用データにエラーが発生したことを通知するためのデータは含まれていないため、制御部201は受信したレスポンス用データに含まれるスルー画を表示する。
In step S953, as a result of the analysis, the received response data does not include data for notifying that an error has occurred, so the
ステップS954にて、制御部201はチャンク送信を終了するか否かを判定する。例えば制御部201はユーザから操作部205(タッチパネル等)を介してライブビューを終了する指示を受け付けた場合チャンク送信を終了すると判定する。チャンク送信を終了する場合、制御部201はステップS955に遷移する。チャンク送信を終了しない場合、制御部201はステップS901に戻りチャンク送信を継続する。
In step S954, the
ステップS955にて、制御部201は通信部211を介してチャンク送信を終了するための指示をデジタルカメラ100へ送信する。
In step S<b>955 , the
ステップS956にて、制御部201は通信部211を介してチャンク送信を終了するためのレスポンス用データを受信したか否かを判定する。チャンク送信を終了するためのレスポンス用データを受信した場合、制御部201は処理を終了する。チャンク送信を終了するためのレスポンス用データを受信していない場合、制御部201は本ステップの処理を繰り返す。
In step S<b>956 , the
以上、本実施形態を利用しないチャンク送信におけるスマートデバイス200の動作の一例について説明した。このような従来のチャンク送信では、アプリケーションの実装において、デジタルカメラ100が送信したレスポンス用データを解析するアルゴリズムをスマートデバイス200は必要とする。
An example of the operation of the
最後に、従来のチャンク送信例に対して本実施形態を利用したチャンク送信におけるデジタルカメラ100およびスマートデバイス200の動作の一例について説明する。図10Aは本実施形態におけるデジタルカメラ100の動作の一例を示すフローチャートである。デジタルカメラ100の制御部101は通信部111を介して、スマートデバイス200からAPI503をGET401でリクエストされたことを検知したことをトリガに、本処理を開始する。このトリガは図6BのステップS603Bに対応する。
Finally, an example of operations of the
ステップS1001にて、制御部101はスルー画を生成できるか否かを判定する。スルー画を生成できない場合、制御部101はステップS1002に遷移する。スルー画を生成できる場合、制御部101はステップS1003に遷移する。本ステップは図9AのステップS901と同様である。
In step S1001, the
ステップS1002にて、制御部101はスルー画を生成できない原因であるエラーの内容を検知する。本ステップは図9AのステップS902と同様である。
In step S<b>1002 , the
ステップS1003にて、制御部101は送信するデータとして、ダミー画像を生成して、作業用メモリ104に保存する。ここで制御部101はステップS1002にて検知したエラーの内容を示すメッセージをダミー画像に含める。このメッセージはユーザが視覚可能なメッセージになるようにダミー画像に含まれる。なお、このダミー画像の生成するための処理はスルー画を読み込む処理よりも負荷の大きい処理ではない。また、ダミー画像の生成するための処理はあらかじめ用意されているエラーを通知するための画像を読み込む処理でもよい。この場合、エラーを通知するための画像は不揮発性メモリ103に記録されている。
In step S<b>1003 , the
ステップS1004にて、スルー画を生成できるため、制御部101はスルー画を読みだして、レスポンスデータを生成し、作業用メモリ104に保存する。
In step S<b>1004 , since a live view can be generated, the
ステップS1005にて、制御部101は通信部111を介して、スマートデバイス200に作業用メモリ104に保持しているレスポンスデータを送信して処理を終了する。
In step S1005, the
ステップS1006にて、制御部101は通信部111を介して、スマートデバイス200からチャンク送信を終了する指示を受信したか否かを判定する。スマートデバイス200からチャンク送信を終了する指示を受信した場合、制御部101はステップS1007に遷移する。スマートデバイス200からチャンク送信を終了する指示を受信していない場合、制御部101はステップS1001に戻り、本処理を繰り返す。
In step S<b>1006 , the
ステップS1007にて、制御部101は通信部111を介してスマートデバイス200へチャンク送信を終了するためのレスポンス用データを送信する。
In step S<b>1007 , the
以上、本実施形態を利用した場合のデジタルカメラ100の動作の一例について説明した。
An example of the operation of the
本実施形態におけるスマートデバイス200の処理の流れについて図10Bを用いて説明する。スマートデバイス200の制御部201が通信部211を介してデジタルカメラ100に、API503をGET401でリクエストし、そのレスポンスとしてスルー画を受信した場合、本フローチャートは開始される。このトリガは図6BのステップS604Bに対応する。
A processing flow of the
ステップS1050にて、制御部201はレスポンス用データを受信したか否かを判定する。レスポンス用データを受信した場合、制御部201はステップS1051に遷移する。レスポンス用データを受信していない場合、制御部201はステップS1050を繰り返す。ただし、所定の時間以上レスポンス用データを受信していない場合、制御部201はデジタルカメラ100に何らかのエラーが発生したとして、表示部206にエラーを表示して処理を終了する。
In step S1050,
ステップS1051にて、制御部201は受信したスルー画を表示部206に表示する。本ステップは図6BのステップS604Bに対応する。
In step S<b>1051 ,
ステップS1052にて、制御部201はチャンク送信を終了するか否かを判定する。例えば制御部201はユーザからライブビューを終了する指示を受け付けた場合チャンク送信を終了すると判定する。チャンク送信を終了する場合、制御部201はステップS1053に遷移する。チャンク送信を終了しない場合、制御部201はステップS1051に戻りチャンク送信を継続する。
In step S1052, the
ステップS1053にて、制御部201は通信部211を介してチャンク送信を終了するための指示をデジタルカメラ100へ送信する。
In step S<b>1053 , the
ステップS1054にて、制御部201は通信部211を介してチャンク送信を終了するためのレスポンス用データを受信したか否かを判定する。チャンク送信を終了するためのレスポンス用データを受信した場合、制御部201は処理を終了する。チャンク送信を終了するためのレスポンス用データを受信していない場合、制御部201は本ステップの処理を繰り返す。
In step S<b>1054 , the
以上、本実施形態を利用した場合のスマートデバイス200の動作の一例について説明した。
An example of the operation of the
このように、従来のスルー画を1フレームずつ取得する方法および従来の本実施形態を利用しないチャンク送信では、対向機であるスマートデバイス200は受信したレスポンス用データにエラーが含まれているか否かを解析する処理を必要とした。一方、本実施形態のチャンク送信によってスルー画を取得するAPIにおいて、デジタルカメラ100はスルー画を生成できない場合、代わりにダミー画像を送信する。スマートデバイス200は受信したダミー画像をエラーが含まれているか否かを解析せず表示する。そのため本実施形態におけるチャンク送信では、アプリケーションの実装において、デジタルカメラ100が送信したデータを解析するアルゴリズムをスマートデバイス200は必要としない。これにより通信APIを用いたアプリケーションの実装負荷を低減することができる。特にこの方法は、スマートデバイス200側のアプリケーションの実装負荷を軽減することができる。さらにデジタルカメラ100はダミー画像をエラーの内容を視覚的に表示する画像とすることで、スマートデバイス200の処理を減らすことができる。
As described above, in the conventional method of acquiring through-the-lens images one frame at a time and in the conventional chunk transmission that does not use this embodiment, the
[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other embodiments]
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。 It should be noted that the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying constituent elements without departing from the scope of the present invention at the implementation stage. Further, various inventions can be formed by appropriate combinations of the plurality of constituent elements disclosed in the above embodiments. For example, some components may be omitted from all components shown in the embodiments. Furthermore, components across different embodiments may be combined as appropriate.
Claims (10)
操作手段と、
通信手段と、
前記生成手段でライブビュー画像が生成された場合に、前記通信手段を介して外部装置から第二のリクエストを受信した場合、前記生成手段で生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行い、
前記生成手段でライブビュー画像が生成されなかった場合に、前記通信手段を介して前記外部装置から前記第二のリクエストを受信した場合、エラーの発生を通知するための情報を含むレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行い、
前記通信手段を介して前記外部装置から第一のリクエストを受信した場合、前記生成手段で生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを繰り返し行い、
前記生成手段で生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とが繰り返し行われている場合に、ライブビュー画像が生成されなかった場合、前記生成手段で生成されなかったライブビュー画像の代わりに所定の画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うよう制御する制御手段と
を有することを特徴とする通信装置。 generating means for generating a live view image ;
an operating means;
means of communication;
a process of generating a response from the live view image generated by the generating means when a second request is received from an external device via the communication means when the live view image is generated by the generating means; transmitting the generated response to the external device via the communication means as a response corresponding to the second request;
generating a response including information for notifying the occurrence of an error when the second request is received from the external device via the communication means when the live view image is not generated by the generating means; and transmitting the generated response to the external device via the communication means as a response corresponding to the second request,
When a first request is received from the external device via the communication means, a process of generating a response from the live view image generated by the generating means, and corresponding the generated response to the first request. a process of transmitting a response to the external device via the communication means, and
A process of generating a response from the live view image generated by the generating means and a process of transmitting the generated response to the external device via the communication means as a response corresponding to the first request are repeatedly performed. when the live view image is not generated, a process of generating a response from a predetermined image instead of the live view image that was not generated by the generating means, and sending the generated response to the first a control means for controlling a process of transmitting a response corresponding to the request to the external device via the communication means;
A communication device comprising:
ライブビュー画像を生成する生成ステップと、a generation step of generating a live view image;
前記生成ステップでライブビュー画像が生成された場合に、前記通信手段を介して外部装置から第二のリクエストを受信した場合、前記生成ステップで生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うステップと、a process of generating a response from the live view image generated in the generating step when a second request is received from an external device via the communication means when the live view image is generated in the generating step; a step of transmitting the generated response to the external device via the communication means as a response corresponding to the second request;
前記生成ステップでライブビュー画像が生成されなかった場合に、前記通信手段を介して前記外部装置から前記第二のリクエストを受信した場合、エラーの発生を通知するための情報を含むレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うステップと、When the live view image is not generated in the generating step and the second request is received from the external device via the communication means, a response including information for notifying the occurrence of an error is generated. and transmitting the generated response to the external device via the communication means as a response corresponding to the second request;
前記通信手段を介して前記外部装置から第一のリクエストを受信した場合、前記生成ステップで生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを繰り返し行うステップと、a process of generating a response from the live view image generated in the generating step when a first request is received from the external device via the communication means; and corresponding the generated response to the first request. a step of repeatedly performing a process of transmitting a response to the external device via the communication means;
前記生成ステップで生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とが繰り返し行われている場合に、ライブビュー画像が生成されなかった場合、前記生成ステップで生成されなかったライブビュー画像の代わりに所定の画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うステップとA process of generating a response from the live view image generated in the generating step and a process of transmitting the generated response to the external device via the communication means as a response corresponding to the first request are repeatedly performed. when the live view image is not generated, a process of generating a response from a predetermined image instead of the live view image that was not generated in the generating step, and sending the generated response to the first a step of transmitting a response corresponding to the request to the external device via the communication means;
を有することを特徴とする制御方法。A control method characterized by having
ライブビュー画像を生成する生成ステップと、a generation step of generating a live view image;
前記生成ステップでライブビュー画像が生成された場合に、前記通信手段を介して外部装置から第二のリクエストを受信した場合、前記生成ステップで生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うステップと、a process of generating a response from the live view image generated in the generating step when a second request is received from an external device via the communication means when the live view image is generated in the generating step; a step of transmitting the generated response to the external device via the communication means as a response corresponding to the second request;
前記生成ステップでライブビュー画像が生成されなかった場合に、前記通信手段を介して前記外部装置から前記第二のリクエストを受信した場合、エラーの発生を通知するための情報を含むレスポンスを生成する処理と、生成されたレスポンスを前記第二のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うステップと、When the live view image is not generated in the generating step and the second request is received from the external device via the communication means, a response including information for notifying the occurrence of an error is generated. and transmitting the generated response to the external device via the communication means as a response corresponding to the second request;
前記通信手段を介して前記外部装置から第一のリクエストを受信した場合、前記生成ステップで生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを繰り返し行うステップと、a process of generating a response from the live view image generated in the generating step when a first request is received from the external device via the communication means; and corresponding the generated response to the first request. a step of repeatedly performing a process of transmitting a response to the external device via the communication means;
前記生成ステップで生成されたライブビュー画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とが繰り返し行われている場合に、ライブビュー画像が生成されなかった場合、前記生成ステップで生成されなかったライブビュー画像の代わりに所定の画像からレスポンスを生成する処理と、生成されたレスポンスを前記第一のリクエストに対応するレスポンスとして前記通信手段を介して前記外部装置に送信する処理とを行うステップとA process of generating a response from the live view image generated in the generating step and a process of transmitting the generated response to the external device via the communication means as a response corresponding to the first request are repeatedly performed. when the live view image is not generated, a process of generating a response from a predetermined image instead of the live view image that was not generated in the generating step, and sending the generated response to the first a step of transmitting a response corresponding to the request to the external device via the communication means;
を実行させるためのプログラム。program to run the
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021003492A JP7196209B2 (en) | 2021-01-13 | 2021-01-13 | Communication device, control method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021003492A JP7196209B2 (en) | 2021-01-13 | 2021-01-13 | Communication device, control method and program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018242856A Division JP6824949B2 (en) | 2018-12-26 | 2018-12-26 | Communication equipment, control methods and programs |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021064971A JP2021064971A (en) | 2021-04-22 |
JP7196209B2 true JP7196209B2 (en) | 2022-12-26 |
Family
ID=75486638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021003492A Active JP7196209B2 (en) | 2021-01-13 | 2021-01-13 | Communication device, control method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7196209B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005328285A (en) | 2004-05-13 | 2005-11-24 | Sanyo Electric Co Ltd | Portable telephone |
US20140047143A1 (en) | 2012-08-10 | 2014-02-13 | Logitech Europe S.A. | Wireless video camera and connection methods including a usb emulation |
JP2018190173A (en) | 2017-05-02 | 2018-11-29 | キヤノン株式会社 | Communication device, method for controlling the same, program, and communication system |
-
2021
- 2021-01-13 JP JP2021003492A patent/JP7196209B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005328285A (en) | 2004-05-13 | 2005-11-24 | Sanyo Electric Co Ltd | Portable telephone |
US20140047143A1 (en) | 2012-08-10 | 2014-02-13 | Logitech Europe S.A. | Wireless video camera and connection methods including a usb emulation |
JP2018190173A (en) | 2017-05-02 | 2018-11-29 | キヤノン株式会社 | Communication device, method for controlling the same, program, and communication system |
Also Published As
Publication number | Publication date |
---|---|
JP2021064971A (en) | 2021-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10997230B2 (en) | Image supply apparatus, information processing apparatus, control method thereof, and storage medium | |
US10225455B2 (en) | Communication apparatus, information processing apparatus, methods and computer-readable storage medium | |
US11082600B2 (en) | Electronic apparatus that performs wireless communication with an image capturing device at two different communication speeds, and method for controlling same | |
US9760250B2 (en) | Electronic device and method for controlling the same | |
JP7175634B2 (en) | Communication device, control method and program | |
US20180324075A1 (en) | Communication apparatus and control method thereof and communication system | |
US10567634B2 (en) | Image capturing apparatus, communication apparatus, and control methods thereof | |
US20180152491A1 (en) | Image provision apparatus and image reception apparatus, control method thereof, image communication system, and computer-readable storage medium | |
US9756195B2 (en) | Communication apparatus capable of communicating with external apparatus, control method for communication apparatus, and storage medium | |
US20200213630A1 (en) | Communication apparatus, control method for controlling the same, and recording medium for the same | |
US20190335112A1 (en) | Communication apparatus and control method thereof | |
JP7196209B2 (en) | Communication device, control method and program | |
US11522941B2 (en) | Communication apparatus capable of communicating with external apparatus based on hypertext transfer protocol, method for controlling communication apparatus, and recording medium | |
JP7218164B2 (en) | Communication device and its control method | |
JP6824949B2 (en) | Communication equipment, control methods and programs | |
US10728451B2 (en) | Communication device for communicating with external device, method for controlling the same, and recording medium | |
US11140279B2 (en) | Communication system, communication apparatus, control method, non-transitory computer-readable storage medium, and server apparatus | |
US11197327B2 (en) | Communication apparatus, control method for communication apparatus, and recording medium | |
JP7253919B2 (en) | COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND PROGRAM | |
US20210105836A1 (en) | Communication apparatus, method for controlling communication apparatus, and storage medium | |
KR20230165122A (en) | Communication apparatus, method for controlling same, and computer program | |
JP2023125841A (en) | Communication apparatus, communication control method, and program | |
JP2021166336A (en) | Communication apparatus, control method of communication apparatus, and program | |
JP2019067133A (en) | Information processing device, control method of information processing device, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211223 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211223 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221027 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20221115 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221214 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7196209 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |