@@ -408,8 +408,8 @@ public class MAIN1 {
408408}
409409```
410410
411- * Support for color normalization coverage, which can display more image features or remove more redundant features by
412- specifying the color values of the channel.
411+ * It supports color binarization and regularization coverage, and can display more image features or remove more
412+ redundant features by specifying the color values of the channel.
413413
414414``` java
415415package zhao.algorithmMagic ;
@@ -427,10 +427,10 @@ public class MAIN1 {
427427 ColorMatrix parse1 = ColorMatrix . parse(url);
428428 // 将 URL 图像矩阵中所有 G 通道颜色数值大于 40 的颜色变更为黑色,反之变更为白色
429429 // 在这里由于选择了 G 通道 因此 绿色越深 越有可能变为白色
430- parse1. regularity (ColorMatrix . _G_, 40 , 0 , 0xffffff );
430+ parse1. globalBinary (ColorMatrix . _G_, 40 , 0 , 0xffffff );
431431 // 也可以使用其它颜色通道进行色彩的调整
432- parse1. regularity (ColorMatrix . _R_, 40 , 0 , 0xffffff );
433- parse1. regularity (ColorMatrix . _B_, 40 , 0 , 0xffffff );
432+ parse1. globalBinary (ColorMatrix . _R_, 40 , 0 , 0xffffff );
433+ parse1. globalBinary (ColorMatrix . _B_, 40 , 0 , 0xffffff );
434434 // 查看结果图像
435435 parse1. show(" image" );
436436 }
@@ -466,4 +466,116 @@ public class MAIN1 {
466466}
467467```
468468
469+ * Ability to manually create an empty DataFrame object and independently manipulate the data therein.
470+
471+ ``` java
472+ package zhao.algorithmMagic ;
473+
474+ import zhao.algorithmMagic.operands.table.DataFrame ;
475+ import zhao.algorithmMagic.operands.table.FDataFrame ;
476+ import zhao.algorithmMagic.operands.table.FieldCell ;
477+ import zhao.algorithmMagic.operands.table.FinalSeries ;
478+
479+ public class MAIN1 {
480+ public static void main (String [] args ) {
481+ // 创建一个空 DF 对象 以 name 列作为行主键索引
482+ FDataFrame create = FDataFrame . select(FieldCell . parse(" name" , " sex" , " phoneNum" ), 1 );
483+ // 插入一些数据
484+ DataFrame insert = create. insert(
485+ FinalSeries . parse(" zhao" , " M" , " 110xxxxxxxx" ),
486+ FinalSeries . parse(" tang" , " W" , " 110xxxxxxxx" ),
487+ FinalSeries . parse(" yang" , " M" , " 110xxxxxxxx" )
488+ );
489+ // 查看数据集
490+ System . out. println(insert);
491+ // 将其中的 name 列 sex 列 查询
492+ System . out. println(
493+ insert. select(
494+ FieldCell . $(" name" ). as(" AllName" ),
495+ FieldCell . $(" sex" ). as(" AllSex" )
496+ )
497+ );
498+ }
499+ }
500+ ```
501+
502+ * 支持在 group 的时候指定 where子句,使得计算效率大大增强
503+
504+ ``` java
505+ package zhao.algorithmMagic ;
506+
507+ import zhao.algorithmMagic.operands.table.DataFrame ;
508+ import zhao.algorithmMagic.operands.table.FDataFrame ;
509+ import zhao.algorithmMagic.operands.table.FieldCell ;
510+ import zhao.algorithmMagic.operands.table.FinalSeries ;
511+
512+ import java.net.MalformedURLException ;
513+
514+ public class MAIN1 {
515+ public static void main (String [] args ) {
516+ // 创建一个空 DF 对象 以 name 列作为行主键索引
517+ FDataFrame create = FDataFrame . select(FieldCell . parse(" name" , " sex" , " phoneNum" ), 1 );
518+ // 插入一些数据
519+ DataFrame insert = create. insert(
520+ FinalSeries . parse(" zhao1" , " M" , " 110xxxxxxxx" ),
521+ FinalSeries . parse(" tang2" , " W" , " 120xxxxxxxx" ),
522+ FinalSeries . parse(" yang3" , " W" , " 110xxxxxxxx" ),
523+ FinalSeries . parse(" zhao4" , " M" , " 120xxxxxxxx" ),
524+ FinalSeries . parse(" tang5" , " W" , " 110xxxxxxxx" ),
525+ FinalSeries . parse(" yang6" , " W" , " 110xxxxxxxx" ),
526+ FinalSeries . parse(" zhao7" , " M" , " 120xxxxxxxx" ),
527+ FinalSeries . parse(" tang8" , " W" , " 110xxxxxxxx" ),
528+ FinalSeries . parse(" yang9" , " W" , " 110xxxxxxxx" )
529+ );
530+ // 查看数据集
531+ System . out. println(insert);
532+ // 将其中手机号前三位不为 120 的数据行按照其中的 sex 分组 在这里直接使用分组时过滤即可
533+ System . out. println(
534+ insert. groupBy(" sex" , v - > {
535+ // 获取到手机号的字符串
536+ String s = v. getCell(2 ). toString();
537+ // 判断前 3 个字符是否为 120 (是否以 120 开头) 如果是就不添加
538+ return ! s. startsWith(" 120" );
539+ }). count()
540+ );
541+ }
542+ }
543+ ```
544+
545+ * Support for local binarization operations, which can effectively achieve image binarization processing. Compared to global binarization, functions are more flexible.
546+
547+ ``` java
548+ package zhao.algorithmMagic ;
549+
550+ import zhao.algorithmMagic.operands.matrix.ColorMatrix ;
551+
552+ import java.net.MalformedURLException ;
553+ import java.net.URL ;
554+
555+ public class MAIN1 {
556+ public static void main (String [] args ) throws MalformedURLException {
557+ // 获取到图像矩阵
558+ ColorMatrix parse = ColorMatrix . parse(new URL (" https://img-blog.csdnimg.cn/img_convert/5765bdab08ef6e117d434e7e225b9013.png" ));
559+ parse. show(" image" );
560+ System . out. println(" ok!!!" );
561+ System . out. println(" 长 = " + parse. getRowCount());
562+ System . out. println(" 宽 = " + parse. getColCount());
563+ // 将图像进行局部二值化
564+ parse. localBinary(
565+ // 指定本次二值化选择的颜色通道
566+ ColorMatrix . _G_,
567+ // 指定本次二值化选出的局部图像矩阵数量
568+ 100 ,
569+ // 指定本次二值化中局部矩阵中大于局部阈值的颜色编码
570+ 0xffffff ,
571+ // 指定本次二值化中局部矩阵中小于局部阈值的颜色编码
572+ 0 ,
573+ // 指定本次二值化中局部阈值生成后要进行的微调数值,这里是降低20个阈值数值
574+ - 30
575+ );
576+ // 查看结果数据
577+ parse. show(" image" );
578+ }
579+ }
580+ ```
469581### Version update date : xx xx-xx-xx
0 commit comments