# image processing polywords # add handler to polywords defined in binary module # add to back of polyword list # use gensym trick (yet another dirty bricabrac meta compile trick) : ip-gensym >string "image:" swap concat >symbol ; : ip-add-polyword dup find swap ip-gensym find swap poly-add-back ; create-polyword zrot "( thing angle zoomx zoomy centerx centery -- thing )\tZoom and rotate." doc create-polyword cog "( thing -- avg.intensity cog.x cog.y var.x var.y )\tCenter of gravity." doc create-polyword avg "( thing thing -- average )\tCompute a+b/2." doc create-polyword sign "( thing -- sign )\tCompute sign of thing." doc create-polyword histo "( thing n -- matrix )\tCreate a histogram with n bins from thing (image)." doc # connect to global polywords # todo: join index halve double list (+ * - or min max xor and avg abs convert cog zrot sign histo) ' ip-add-polyword for-each create-polyword join "( list -- thing )\tConvert a list of things into a composite object." doc create-polyword unjoin "( thing -- list )\tConvert a composite object into a list of things." doc ' image:join polyword join ' image:unjoin polyword unjoin