0

私のプログラムは、サードパーティのアプリケーションから画像を読み込み、PictureBox にそのまま表示することになっています。次に、何らかの画像処理アルゴリズムを使用して画像を変更し、結果の画像を同じ PictureBox に表示します。次に、外部システムから別の画像を取得し、表示、処理、結果の表示などを行います。これにより、ユーザーは画像を 1 つずつ表示し、その間に数秒の遅延が発生するはずです。

Windows フォームでこれを行うことは可能ですか (プロジェクトは C++/CRL でコーディングされています)。もしそうなら、どうすればいいですか?

これまでに行ったコードは次のようになります (私が達成したいことを理解するために関連すると思われるコードのチャンクのみを表示しています):

private: Bitmap^ image1;

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {

 //connecting to the third party application
 PImage PI;
 PI.EstablishConnection();  

 //setting image parameters
 PI.setImageParameters(x, y, z, yaw, pitch, roll); 


//retrieving image data 
int W = PI.returnCols(); 
 int H = PI.returnRows();

//updating Bitmap object as per image data       
 image1 = gcnew Bitmap (W, H);

//....

//function to modify the display and load the new image in pictureBox
ModifyDisplay (image1->Height, image1->Width, image1, PI);
pictureBox1->Image = image1;

//...
//process current image using some algorithms

//modify current image as per the processing and display it
ModifyDisplay (image1->Height, image1->Width, image1, PI);
pictureBox1->Image = image1;

//...fetch a new image
//function to modify the display and load the second image in pictureBox
ModifyDisplay (image1->Height, image1->Width, image1, PI);
pictureBox1->Image = image1;


//...
//process second image using some algorithms

//...and so on
}

私が得た結果は、最後の画像のみが表示され、それ以前に行われたものはすべて表示されないということです。

4

0 に答える 0