MCPcopy Create free account
hub / github.com/creatale/node-dv / kernelSetElement

Function kernelSetElement

deps/leptonica/src/kernel.c:242–259  ·  view source on GitHub ↗

! * \brief kernelSetElement() * * \param[in] kel kernel * \param[in] row * \param[in] col * \param[in] val * \return 0 if OK; 1 on error */

Source from the content-addressed store, hash-verified

240 * \return 0 if OK; 1 on error
241 */
242l_int32
243kernelSetElement(L_KERNEL *kel,
244 l_int32 row,
245 l_int32 col,
246 l_float32 val)
247{
248 PROCNAME("kernelSetElement");
249
250 if (!kel)
251 return ERROR_INT("kel not defined", procName, 1);
252 if (row < 0 || row >= kel->sy)
253 return ERROR_INT("kernel row out of bounds", procName, 1);
254 if (col < 0 || col >= kel->sx)
255 return ERROR_INT("kernel col out of bounds", procName, 1);
256
257 kel->data[row][col] = val;
258 return 0;
259}
260
261
262/*!

Callers 7

kernelCreateFromStringFunction · 0.85
kernelCreateFromFileFunction · 0.85
kernelCreateFromPixFunction · 0.85
makeFlatKernelFunction · 0.85
makeGaussianKernelFunction · 0.85
makeDoGKernelFunction · 0.85
makeRangeKernelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected