| 1748 | \*************************************************************************************************/ |
| 1749 | |
| 1750 | void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst) |
| 1751 | { |
| 1752 | if( nsrc == 0 || !src ) |
| 1753 | { |
| 1754 | _dst.release(); |
| 1755 | return; |
| 1756 | } |
| 1757 | |
| 1758 | int totalCols = 0, cols = 0; |
| 1759 | size_t i; |
| 1760 | for( i = 0; i < nsrc; i++ ) |
| 1761 | { |
| 1762 | CV_Assert( !src[i].empty() && src[i].dims <= 2 && |
| 1763 | src[i].rows == src[0].rows && |
| 1764 | src[i].type() == src[0].type()); |
| 1765 | totalCols += src[i].cols; |
| 1766 | } |
| 1767 | _dst.create( src[0].rows, totalCols, src[0].type()); |
| 1768 | Mat dst = _dst.getMat(); |
| 1769 | for( i = 0; i < nsrc; i++ ) |
| 1770 | { |
| 1771 | Mat dpart = dst(Rect(cols, 0, src[i].cols, src[i].rows)); |
| 1772 | src[i].copyTo(dpart); |
| 1773 | cols += src[i].cols; |
| 1774 | } |
| 1775 | } |
| 1776 | |
| 1777 | void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst) |
| 1778 | { |