Seamless splicing about panoramic images

xiaoxiao2021-03-06  85

Main topic: Seamless stitching about panoramic images

Servers: Zerodata ()

Isometric:

Credit value: 98

Forum: VC / MFC Graphics Processing / Algorithm

Question points: 0

Reply number: 9

Published: 2003-07-25 09: 43: 34z

Please have a prawn pointing point for the panoramic image stitching,

I am doing the splicing of panoramic images, which is to split the coincidence into small pieces, and then the grayscale comparison, to find a suture curve, but can't do seamless splicing,

Dear, if you have this experience, please talk about how to implement it.

Reply to: Harry202 (Harry) () Reputation: 104 2003-07-25 09: 50: 23Z score: 0

Where is the similar software download?

TOP

Reply to: Zerodata () () Reputation: 98 2003-07-25 09: 55: 31Z score: 0

There is a very good software: Pixmaker,

TOP

Reply to: YELLOWWOLF (you have given the name, so I register the color wolf) () Reputation: 66 2003-07-25 11: 49: 04Z score: 0

What forum, I sent it, he said that I didn't log in, there were so many white.

Http://expert.9cbs.net/expert/topic/1988/1988156.xml?temp=.2311975

just for reference.

TOP

Reply to: gzcompiler () Reputation: 120 2003-07-25 11: 58: 22Z score: 0

Image The brightness of the contact point should first be consistent.

If there is a displacement deviation, the coincide is stretched.

TOP

Reply to: Zerodata () () Reputation: 98 2003-07-25 12: 36: 26Z score: 0

The brightness of the contact point has been adjusted, which can make two pictures under different exposure to transition,

How is the problem now find a series of contact points

For example, photographing two indoor photos, there is a beam in the coincident area, because the angle of the beam shooting is different, the beam is not necessarily parallel or just in the absence of the zone, and it is very likely that this intersection, then this intersection, how to find it ?

Also: The deviation of the coincid portion is slower, not very feasible.

TOP

Reply to: Zerodata () () Reputation: 98 2003-07-25 12: 41: 35Z score: 0

TO: YELLOWWOLF (you have given the name, so I register the color wolf)

I saw the discussion in another post. I don't understand your matching algorithm. Can you send me a copy of your Code?

Wyy@ezonics.com.cn

TOP

Reply to: Yellowwolf (you have given the name, so I register the wolf) () Reputation: 66 2003-07-25 16: 20: 03Z score: 0

Bool CDIB :: SetCompardib (BMP * BMP1, BMP * BMP2)

{

Unsigned int Temparea = 0;

Maxarea = 0;

INT RIGHTBMP_H = BMP2-> bmp_width / 3;

// Comparison from each pixel of the left image from the first pixel on the right

For (Register INT LEFTBMP_W = BMP1-> BMP_WIDTH; LEFTBMP_W> = 0; LeftBMP_W -)

{

For (register unsigned int = 0; leftbmp_h bmp_height; leftbmp_h )

{

BMP2-> PIX_X = 0;

BMP2-> PIX_Y = RightBMP_H; BMP1-> PIX_X = LEFTBMP_W;

BMP1-> PIX_Y = LeftBMP_H;

IF (Issamepix (BMP1, BMP2, BMP1-> PIX_X, BMP1-> PIX_Y, BMP2-> PIX_Y))

IF (Issamecol (BMP1, BMP2, BMP1-> PIX_X, BMP1-> PIX_Y, BMP2-> PIX_Y))

Issamerect (BMP1, BMP2);

}

}

IF (Maxarea! = 0)

{

MERGEDIB (BMP1, BMP2);

Return True;

}

Messagebox (NULL, "No consolidation point, no merge", null, mb_ok;

Return False;

}

Long CDIB :: getPixoffset (unsigned int x, unsigned int y, bmp * bmp)

{

IF ((x> = 0 && x bmp_width) && (y> = 0 && y bmp_height))

Return (Y * BMP-> BMP_LINE_W X * (BMP-> BMP_bitcount / 8));

Return 0;

}

Bool CDIB :: Issamepix (BMP * BMP1, BMP * BMP2, INT X1, INT Y1, INT X2, INT Y2)

{

BYTE * P, * Q;

P = BMP1-> LPDIB GetPixOffset (x1, y1, bmp1);

Q = BMP2-> LPDIB GetPixOffset (x2, y2, bmp2);

For (Register INT I = 0; i bmp_bitcount / 8; i )

IF (ABS (P [I] - Q [I])> 25) Return False;

// if (p [i]! = q [i]) Return False;

Return True;

}

Bool CDIB :: Issamecol (BMP * BMP1, BMP * BMP2, INT X1, INT Y1, INT X2, INT Y2)

{

Unsigned int BELOW_H1 = BMP1-> BMP_HEIGHT - Y1; / / The left picture is a point pixel to the bottom of the figure.

Unsigned int BELOW_H2 = BMP2-> BMP_HEIGHT - Y2; / / The right picture When the point fetten is the bottom of the figure

Unsigned int h = (BELOW_H1> BELOW_H2)? Below_h2: Below_h1; // Get two figures to the bottom of the bottom

Register unsigned int i = 0; i

{

// Get the next pixel continues

IF (! Issamepix (BMP1, BMP2, X1, Y1, X2, Y2))

Return False;

Y1 = 1;

Y2 = 1;

}

Return True;

}

BOOL CDIB :: IssameRect (bmp * bmp1, bmp * bmp2)

{

Unsigned Int x1, y1, x2, y2;

Unsigned int w1 = bmp1-> bmp_width - bmp1-> pix_x; unsigned int w2 = bmp2-> bmp_width - bmp2-> pix_x;

Unsigned int w = (w1> w2)? W2: w1;

X1 = BMP1-> PIX_X; Y1 = BMP1-> PIX_Y;

X2 = BMP2-> PIX_X; Y2 = BMP2-> PIX_Y;

For (Register unsigned int i = 0; i

{

IF (! Issamecol (BMP1, BMP2, X1, Y1, X2, Y2))

Return False;

X1 ;

X2 ;

}

Unsigned int h = (bmp1-> bmp_height - bmp1-> pix_y) <(bmp2-> bmp_height - bmp2-> pix_y)? (bmp1-> bmp_height - bmp1-> pix_y): (bmp2-> bmp_height - BMP2-> PIX_Y );

IF (i * h> maxarea)

{

Maxarea = i * h;

Overlap_info.Left_starx = BMP1-> PIX_X;

Overlap_info.left_stary = bmp1-> pix_y;

OVERLAP_INFO.LEFT_ENDX = I BMP1-> PIX_X;

Overlap_info.Left_ENDY = H BMP1-> PIX_Y;

Overlap_info.right_starx = BMP2-> PIX_X;

Overlap_info.right_stary = BMP2-> PIX_Y;

Overlap_info.right_endx = i bmp2-> pix_x;

Overlap_info.right_ENDY = H BMP2-> PIX_Y;

}

Return True;

}

Void CDIB :: Mergedib (BMP * BMP1, BMP * BMP2)

{

BYTE * UnitBuff;

Unsigned int unit_w = bmp2-> bmp_width overlap_info.Left_starX; // Width after the merge file

Unsigned int unit_h = overlap_info.Left_endy - overlap_info.Left_stary; // High after the merge file

INT BYTE_W = Unit_w * (bmp1-> bmp_bitcount / 8); // Get true data

IF (Byte_W% 4) BYTE_W = byte_w (4 - byte_w% 4); // Get the number of bytes of the data in one line

INT imageDATA = byte_w * unit_h; // Get the number of bytes of the entire file data

IF (! (unitbuff = new byte [imagedata)))))

{

MessageBox (NULL, "Failure File Application Memory", "Memory Application", MB_OK;

Return;

}

BYTE * P1, * P2, * P3;

P1 = BMP1-> LPDIB OVERLAP_INFO.LEFT_STARY * BMP1-> BMP_LINE_W; P2 = BMP2-> LPDIB Overlap_info.right_stary * bmp2-> bmp_line_w;

P3 = unitbuff;

For (unsigned int = 0; i

{

Memcpy (P3, P1, Overlap_info.Left_starx * (BMP1-> BMP_bit / 8));

P3 = Overlap_info.Let_starx * (bmp1-> bmp_bitcount / 8);

P1 = BMP1-> BMP_LINE_W;

Memcpy (p3, p2, bmp2-> bmp_width * (bmp2-> bmp_bitcount / 8));

P3 = BMP2-> bmp_width * (bmp2-> bmp_bitcount / 8);

P2 = BMP2-> BMP_LINE_W;

IF ((unsigned int) (P3 - UnitBuff)% 4! = 0)

P3 = 4 - (unsigned int) ((p3 - unitbuff)% 4);

}

Tempbmp.bmp_bitcount = bmp1-> bmp_bitcount;

Tempbmp.bmp_height = unit_h;

Tempbmp.bmp_width = unit_w;

IF (Tempbmp.lpdib! = null)

Tempbmp.lpdib = NULL;

Tempbmp.lpdib = new byte [imagedata];

IF (! Tempbmp.lpdib)

{

MessageBox (NULL, "Request for Memory", "Memory Application", MB_OK;

Return;

}

IF (bmp1-> bmp_bitcount == 8)

{

IF (! Tempbmp.lppalette! = null)

Tempbmp.lppalette = null;

// Access color table

Tempbmp.lppalette = new byte [sizeof (rgbquad) * Palettesize (8)];

Memcpy (Tempbmp.lppalette, BMP1-> LPPALETTE, SIZEOF (RGBQUAD) * PALETESIZE (8));

}

IF (BMP1-> bmp_bitcount == 24)

Tempbmp.lppalette = null;

// Data recovery file sequence

For (i = 0; i

Memcpy (Tempbmp.lpdib BYTE_W * I, UnitBuff Byte_w * (unit_h - i - 1), byte_w);

// data write file

CFILE PF ("B.BMP", CFile :: MODECREATE | CFILE :: ModeWrite;

IF (pf == null)

{

MessageBox (Null, "Create Merge Filed!", "CREATE FILE", MB_OK;

Return;

}

BitmapfileHeader BM;

BM.BFTYPE = 0x4d42; bm.bfsize = imagedata;

BM.BFRESERVED1 = 0;

Bm.bfreserved2 = 0;

BM.BFOFFBITS = SizeOf (BitmapfileHeader) Sizeof (BitmapInfoHead);

IF (BMP1-> BMP_bit! = 24)

BM.BFOFFBITS = Palettesize (bmp1-> bmp_bitcount) * sizeof (rgbquad);

Pf.write (& BM, SIZEOF (BitmapfileHeader);

BitmapInfoHeader BMI;

Bmi.bisize = sizeof (bitmapinfohead);

Bmi.biwidth = unit_w;

bmi.biheight = unit_h;

Bmi.Biplanes = 1;

BMI.BIBITCOUNT = BMP1-> bmp_bit;

Bmi.Bicompression = BI_RGB;

Bmi.bisizeImage = 0;

Bmi.bixpelspermeter = 0;

Bmi.biypelspermeter = 0;

Bmi.Biclrused = 0;

Bmi.birrimportant = 0;

Pf.write (& BMI, SIZEOF (BitmapInfoHeader);

IF (BMP1-> BMP_bit! = 24)

Pf.write (BMP1-> LPPALETTE, PALETTESIZE (BMP1-> BMP_BITCOUNT) * SIZEOF (RGBQUAD));

Pf.write (tempbmp.lpdib, byte_w * unit_h);

DELETE [] UnitBuff;

MessageBox (NULL, "two-diagram combined file write success!", "Merge File Information", 0);

Return;

}

Biography - "Character -" Big Block

I am doing now with you, and I have taken a few challenges, the brightness is different, and some good models are a bit difficult.

You can see that this picture is not very helpful.

Have you added me in QQ, let's exchange, I am always in the evening.

TOP

Reply to: Zerodata () () Reputation: 98 2003-07-25 17: 48: 34Z score: 0

TO: YELLOWWOLF (you have given the name, so I register the color wolf)

I have already added you, talk at night.

My QQ: 52217141

TOP

Reply to: Yellowwolf (you have given the name, so I register the color wolf) () Reputation: 66 2003-07-25 19: 34: 52Z score: 0

I am fighting with a color difference. Change the code a little

Rightbmp_h = bmp2-> bmp_height / 3; // Take a point in the middle of the image

// Comparison from the 1/3 of the right picture to each pixel on the left

For (Register INT LEFTBMP_W = BMP1-> BMP_WIDTH; LEFTBMP_W> = 0; LeftBMP_W -)

IF (ABS (P [I] - Q [I])> 25) Return False; // Note

IF (p [i]! = q [i]) return false; // use this sentence

I'm sorry. Tonight, I am sorry, I am tomorrow.

This problem has been bombed

转载请注明原文地址:https://www.9cbs.com/read-121778.html

New Post(0)