----------------------------------------------------------------------* * Helper function * *----------------------------------------------------------------------*/ ! * \brief create2dFloatArray() * * \param[in] sy rows == height * \param[in] sx columns == width * \return doubly indexed array i.e., an array of sy row pointers,
| 496 | * </pre> |
| 497 | */ |
| 498 | l_float32 ** |
| 499 | create2dFloatArray(l_int32 sy, |
| 500 | l_int32 sx) |
| 501 | { |
| 502 | l_int32 i; |
| 503 | l_float32 **array; |
| 504 | |
| 505 | PROCNAME("create2dFloatArray"); |
| 506 | |
| 507 | if ((array = (l_float32 **)LEPT_CALLOC(sy, sizeof(l_float32 *))) == NULL) |
| 508 | return (l_float32 **)ERROR_PTR("ptr array not made", procName, NULL); |
| 509 | |
| 510 | for (i = 0; i < sy; i++) |
| 511 | array[i] = (l_float32 *)LEPT_CALLOC(sx, sizeof(l_float32)); |
| 512 | return array; |
| 513 | } |
| 514 | |
| 515 | |
| 516 | /*----------------------------------------------------------------------* |