Artifact 1a6359d24c8e82e4ad79917bc5b6847e1161d2a5:
- File
operator/montageh-grey16.crimp
— part of check-in
[122bdc7d78]
at
2011-12-14 21:53:28
on branch infinite-plane
— Continued from previous commit.
Left to check/modify are
unary: ahe, convolve, region_sum, rof
binary: atan2, hypot, pow, cannyinternal, complex div/multiply, join, joint-bilateral, threshold
other: warp-field, cut (*)
(*) Currently done via 'crop', semantic mismatch. Better as their own operator. (user: andreask size: 1201) [more...]
montageh_grey16 Tcl_Obj* imageLeftObj Tcl_Obj* imageRightObj /* * Place the two images adjacent to each other in the result, from left to * right. The images have to have the same height. */ crimp_image* result; crimp_image* imageLeft; crimp_image* imageRight; int x, y; crimp_input (imageLeftObj, imageLeft, grey16); crimp_input (imageRightObj, imageRight, grey16); if (!crimp_eq_height (imageLeft, imageRight)) { Tcl_SetResult(interp, "image heights do not match", TCL_STATIC); return TCL_ERROR; } result = crimp_new_grey16_at (crimp_x (imageLeft), crimp_y (imageLeft), crimp_w (imageLeft) + crimp_w (imageRight), crimp_h (imageLeft)); for (y = 0; y < crimp_h (result); y++) { for (x = 0; x < crimp_w (imageLeft); x++) { GREY16 (result, x, y) = GREY16 (imageLeft, x, y); } } for (y = 0; y < crimp_h (result); y++) { for (x = 0; x < crimp_w (imageRight); x++) { GREY16 (result, crimp_w (imageLeft) + x, y) = GREY16 (imageRight, x, y); } } Tcl_SetObjResult(interp, crimp_new_image_obj (result)); return TCL_OK; /* vim: set sts=4 sw=4 tw=80 et ft=c: */ /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */