楼主: jaly50
跳转到指定楼层
上一主题 下一主题
收起左侧

Berkeley CS 61B Data Structures(in Java) Project1 加分+讨论帖

 
🔗
bhlsp 2018-4-8 14:55:04 | 只看该作者
全局:








交作业啦
回复

使用道具 举报

🔗
tkft 2018-4-12 20:28:31 | 只看该作者
全局:
终于做完了..
更多图片 小图 大图
组图打开中,请稍候......
回复

使用道具 举报

🔗
nyjahchill 2018-4-19 16:49:50 | 只看该作者
全局:



图1为part1的结果,图2-3为part234的结果
总共完成时间应该是4天左右,
第一个不是很难,第二个读题非常难受,半天都不明白,实际上写的时候是默认了RGB三种颜色出现的前后相同时出现的频率是一样的,然后写起来就好一些。
第三个问题不大,只是在toPixel()进行检测的时候有些小问题检测不出来。
第四个确实很难,难度都在于debug,需要考虑的情况很多,在debug时会发现新的情况和之前写过的比如break;忘了加类似的错误。总的来讲几个method有以下需要考虑的问题

4.13 上午
boxBlur():
numIterations每一此都需要一个新的PixImage,否则n次的结果也等于1次。
需要建立一个数组引用 引用的对象必须初始化,并且第一个要设为原PixImage,这样一共有n+1个引用,注意这一点。
toString()输出的顺序,外循环应该是Height,内循环是Width,不然看起来像做了转置一样,还以为是boxBlur出错,在boxBlur里面改等于南辕北辙。

Sobel()
这个有个自己的问题大家忽略,问题出在indiceY越界,函数中把indiceY = j - (currentHei-1)写成了indiceY = j - (currentWid-1)造成。

Blur()
需要两个jai,在文件夹里面,通过package里面的buildpath创建路径,这样消除了一直显示的error,方法来源于本帖子第四页的老哥,谢谢你。
然后注释了函数中大多数print,感觉没什么用,只有最后的blurFile和次数那个fireld留下来了。
在Blur主函数里面,本来使用的是args给启动Blur的blurFile方法传递参数,这里args不太会用我直接将其改为了文件名,这里有个小细节文件名一定要有.tiff的后缀。

Sobel()
主要问题与Blur相同。

SetPixel()
首先分为(x,y)在DListNode里靠前中间靠后三种情况,另外这里忽略了一点一定要考虑DListNode里面频率为1的情况,单独讨论又分为abc变acc,abc变aac,abc变adc;或者ab变bb,ab变ac;以及类似(这里a代表了只有一个频率的节点)。
当1减为0时,这种情况需要将原节点删除(其实更简单是方法是修改原节点)。
如果使用了RunIterator,在第一个节点删除的时候需要把RunIterator切换,因为RunIterator指向的head。
用toString()来debug很方便。
最后一个bug insert方法引用少指了一个出了问题。

写了很久,也是刚刚起步,有问题对解答和对题目都不明白的都欢迎大家交流。
代码不放了,实在有需要的可以参考 https://github.com/xuanyangece/CS61B.git 里面的pj1 branch。

最后希望加个学分感谢

评分

参与人数 1大米 +2 收起 理由
shendezhuti + 2 很有用的信息!

查看全部评分

回复

使用道具 举报

🔗
kaiwhu 2018-6-6 13:59:13 | 只看该作者
全局:
中断了好久,sad~ 今天重新开始跟课程,先交 project 1 的作业
Part I: Image Blurring and Edge Detection
==========================================

Terminal 输出结果:


图片模糊与边缘检测:



Part II: Converting a Run-Length Encoding to an Image
Part III: Converting an Image to a Run-Length Encoding
Part IV: Changing a Pixel in a Run-Length Encoding
======================================================

Part II, III, IV 的 Terminal 输出结果:
  1. ➜  pj1 javac -cp "jai_core.jar:jai_codec.jar:." RunLengthEncoding.java
  2. ➜  pj1 java -cp ".:jai_core.jar:jai_codec.jar" RunLengthEncoding      
  3. Testing one-parameter RunLengthEncoding constuctor on a 3x3 image.  Input image:
  4. --------------------------------------------------
  5. | 0 0 0 | 1 1 1 | 2 2 2 |
  6. | 3 3 3 | 4 4 4 | 5 5 5 |
  7. | 6 6 6 | 7 7 7 | 8 8 8 |
  8. --------------------------------------------------
  9. Testing getWidth/getHeight on a 3x3 encoding.
  10. Good.
  11. Testing toPixImage() on a 3x3 encoding.
  12. Good.
  13. Testing setPixel() on a 3x3 encoding.
  14. Good.
  15. Testing setPixel() on a 3x3 encoding.
  16. Good.
  17. Testing setPixel() on a 3x3 encoding.
  18. Good.
  19. Testing setPixel() on a 3x3 encoding.
  20. Good.
  21. Testing setPixel() on a 3x3 encoding.
  22. Good.
  23. Testing setPixel() on a 3x3 encoding.
  24. Good.
  25. Testing setPixel() on a 3x3 encoding.
  26. Good.
  27. Testing one-parameter RunLengthEncoding constuctor on another 3x3 image.  Input image:
  28. --------------------------------------------------
  29. | 2 2 2 | 2 2 2 | 3 3 3 |
  30. | 3 3 3 | 4 4 4 | 4 4 4 |
  31. | 5 5 5 | 5 5 5 | 6 6 6 |
  32. --------------------------------------------------
  33. Testing getWidth/getHeight on a 3x3 encoding.
  34. Good.
  35. Testing toPixImage() on a 3x3 encoding.
  36. Good.
  37. Testing setPixel() on a 3x3 encoding.
  38. Good.
  39. Testing setPixel() on a 3x3 encoding.
  40. Good.
  41. Testing one-parameter RunLengthEncoding constuctor on a 5x2 image.  Input image:
  42. --------------------------------------------------
  43. | 0 0 0 | 1 1 1 | 2 2 2 | 3 3 3 | 4 4 4 |
  44. | 5 5 5 | 6 6 6 | 7 7 7 | 8 8 8 | 9 9 9 |
  45. --------------------------------------------------
  46. Testing getWidth/getHeight on a 5x2 encoding.
  47. Good.
  48. Testing toPixImage() on a 5x2 encoding.
  49. Good.
  50. Testing setPixel() on a 5x2 encoding.
  51. Good.
  52. Testing setPixel() on a 5x2 encoding.
  53. Good.
  54. Testing setPixel() on a 5x2 encoding.
  55. Good.
  56. Testing one-parameter RunLengthEncoding constuctor on a 3x2 image.  Input image:
  57. --------------------------------------------------
  58. | 0 0 0 | 1 1 1 | 2 2 2 |
  59. | 3 3 3 | 4 4 4 | 5 5 5 |
  60. --------------------------------------------------
  61. Testing getWidth/getHeight on a 3x2 encoding.
  62. Good.
  63. Testing toPixImage() on a 3x2 encoding.
  64. Good.
  65. Testing setPixel() on a 3x2 encoding.
  66. Good.
  67. Testing setPixel() on a 3x2 encoding.
  68. Good.
  69. Testing setPixel() on a 3x2 encoding.
  70. Good.
  71. ➜  pj1
复制代码


回复

使用道具 举报

🔗
copyrightly 2018-6-27 09:51:07 | 只看该作者
全局:
请问Part II里的RunIterator本质上就是造一个Node的reference吗?另外PartIV的setPixe()需要访问DoublyLinkedList 的node,这样就要把Node这个类里的变量和方法都设为public吗?(是不是一般List里的Node都应该是private?)为什么不能直接用node去访问list呢,还要造一个RunIterator?

我的解答:
github.com/copyrightly/61b/tree/master/pj1

欢迎讨论!
回复

使用道具 举报

🔗
suexin 2018-7-6 17:47:09 | 只看该作者
全局:
用了一整天终于做完这个project了啊啊啊好累。主要是part 4 里要仔细分析各种情况,然后每种情况里都不能有小错误。
我会说我有个地方多加了1检查了一下午吗。。。
嗯,求加分







回复

使用道具 举报

🔗
renyi 2018-7-26 22:36:41 | 只看该作者
全局:
xiaosteven 发表于 2016-7-2 08:54
各位好, 我运行test.java 显示
java.util.zip.ZipException: Not in GZIP format
        at java.util.zip.GZI ...

同遇到这种情况……层主最后跑通了test嘛
回复

使用道具 举报

🔗
martinma 2018-8-8 05:59:11 | 只看该作者
全局:
part 1
  1. Testing getWidth/getHeight on a 3x3 image.  Input image:
  2. 0,0,0, 30,30,30, 80,80,80,
  3. 10,10,10, 120,120,120, 250,250,250,
  4. 240,240,240, 250,250,250, 255,255,255,
  5. Good.
  6. Testing blurring on a 3x3 image.
  7. Good.
  8. Good.
  9. Good.
  10. Testing edge detection on a 3x3 image.
  11. Good.
  12. Testing getWidth/getHeight on a 2x3 image.  Input image:
  13. 0,0,0, 0,0,0,
  14. 100,100,100, 0,0,0,
  15. 100,100,100, 100,100,100,
  16. Good.
  17. Testing blurring on a 2x3 image.
  18. Good.
  19. Testing edge detection on a 2x3 image.
  20. Good.
复制代码






part 2/3/4

  1. Testing one-parameter RunLengthEncoding constuctor on a 3x3 image.  Input image:
  2. 0,0,0, 1,1,1, 2,2,2,
  3. 3,3,3, 4,4,4, 5,5,5,
  4. 6,6,6, 7,7,7, 8,8,8,
  5. Testing getWidth/getHeight on a 3x3 encoding.
  6. Good.
  7. Testing toPixImage() on a 3x3 encoding.
  8. Good.
  9. Testing setPixel() on a 3x3 encoding.
  10. Good.
  11. Testing setPixel() on a 3x3 encoding.
  12. Good.
  13. Testing setPixel() on a 3x3 encoding.
  14. Good.
  15. Testing setPixel() on a 3x3 encoding.
  16. Good.
  17. Testing setPixel() on a 3x3 encoding.
  18. Good.
  19. Testing setPixel() on a 3x3 encoding.
  20. Good.
  21. Testing setPixel() on a 3x3 encoding.
  22. Good.
  23. Testing one-parameter RunLengthEncoding constuctor on another 3x3 image.  Input image:
  24. 2,2,2, 2,2,2, 3,3,3,
  25. 3,3,3, 4,4,4, 4,4,4,
  26. 5,5,5, 5,5,5, 6,6,6,
  27. Testing getWidth/getHeight on a 3x3 encoding.
  28. Good.
  29. Testing toPixImage() on a 3x3 encoding.
  30. Good.
  31. Testing setPixel() on a 3x3 encoding.
  32. Good.
  33. Testing setPixel() on a 3x3 encoding.
  34. Good.
  35. Testing one-parameter RunLengthEncoding constuctor on a 5x2 image.  Input image:
  36. 0,0,0, 1,1,1, 2,2,2, 3,3,3, 4,4,4,
  37. 5,5,5, 6,6,6, 7,7,7, 8,8,8, 9,9,9,
  38. Testing getWidth/getHeight on a 5x2 encoding.
  39. Good.
  40. Testing toPixImage() on a 5x2 encoding.
  41. Good.
  42. Testing setPixel() on a 5x2 encoding.
  43. Good.
  44. Testing setPixel() on a 5x2 encoding.
  45. Good.
  46. Testing setPixel() on a 5x2 encoding.
  47. Good.
  48. Testing one-parameter RunLengthEncoding constuctor on a 3x2 image.  Input image:
  49. 0,0,0, 1,1,1, 2,2,2,
  50. 3,3,3, 4,4,4, 5,5,5,
  51. Testing getWidth/getHeight on a 3x2 encoding.
  52. Good.
  53. Testing toPixImage() on a 3x2 encoding.
  54. Good.
  55. Testing setPixel() on a 3x2 encoding.
  56. Good.
  57. Testing setPixel() on a 3x2 encoding.
  58. Good.
  59. Testing setPixel() on a 3x2 encoding.
  60. Good.
复制代码


回复

使用道具 举报

🔗
gmdlance 2018-9-1 08:07:32 | 只看该作者
全局:
请问有人遇到过NoClassDefFoundError吗?


  1. Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/RenderedImageAdapter
  2.         at ImageUtils.readTIFF(ImageUtils.java:83)
  3.         at ImageUtils.readTIFFPix(ImageUtils.java:93)
  4.         at Sobel.sobelFile(Sobel.java:57)
  5.         at Sobel.main(Sobel.java:129)
  6. Caused by: java.lang.ClassNotFoundException: javax.media.jai.RenderedImageAdapter
  7.         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  8.         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  9.         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
  10.         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
复制代码



连怎么去debug都没想出来...
回复

使用道具 举报

🔗
GenBry 2018-9-7 13:10:20 | 只看该作者
全局:
拖了好久终于写完了
PixImage:
  1. Testing getWidth/getHeight on a 3x3 image.  Input image:
  2. {0 0 0} {30 30 30} {80 80 80}
  3. {10 10 10} {120 120 120} {250 250 250}
  4. {240 240 240} {250 250 250} {255 255 255}
  5. Good.
  6. Testing blurring on a 3x3 image.
  7. Good.
  8. Good.
  9. Good.
  10. Testing edge detection on a 3x3 image.
  11. Good.
  12. Testing getWidth/getHeight on a 2x3 image.  Input image:
  13. {0 0 0} {0 0 0}
  14. {100 100 100} {0 0 0}
  15. {100 100 100} {100 100 100}
  16. Good.
  17. Testing blurring on a 2x3 image.
  18. Good.
  19. Testing edge detection on a 2x3 image.
  20. Good.
复制代码

RunLengthEncoding:
  1. Testing one-parameter RunLengthEncoding constuctor on a 3x3 image.  Input image:
  2. {0 0 0} {1 1 1} {2 2 2}
  3. {3 3 3} {4 4 4} {5 5 5}
  4. {6 6 6} {7 7 7} {8 8 8}
  5. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  6. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  7. width:3 height:3
  8. [[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  9. Testing getWidth/getHeight on a 3x3 encoding.
  10. Good.
  11. Testing toPixImage() on a 3x3 encoding.
  12. Good.
  13. Testing setPixel() on a 3x3 encoding.
  14. Check completed! Encoded image:[[42, 42, 42] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  15. Check completed! Encoded image:[[42, 42, 42] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  16. Good.
  17. Testing setPixel() on a 3x3 encoding.
  18. Check completed! Encoded image:[[42, 42, 42] 2,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  19. Check completed! Encoded image:[[42, 42, 42] 2,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  20. Good.
  21. Testing setPixel() on a 3x3 encoding.
  22. Check completed! Encoded image:[[42, 42, 42] 2,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  23. Check completed! Encoded image:[[42, 42, 42] 2,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  24. Good.
  25. Testing setPixel() on a 3x3 encoding.
  26. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  27. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1]
  28. Good.
  29. Testing setPixel() on a 3x3 encoding.
  30. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 2]
  31. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 2]
  32. Good.
  33. Testing setPixel() on a 3x3 encoding.
  34. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[42, 42, 42] 1]
  35. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[42, 42, 42] 1]
  36. Good.
  37. Testing setPixel() on a 3x3 encoding.
  38. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[42, 42, 42] 2]
  39. Check completed! Encoded image:[[0, 0, 0] 1,[42, 42, 42] 1,[2, 2, 2] 2,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[42, 42, 42] 2]
  40. Good.
  41. Testing one-parameter RunLengthEncoding constuctor on another 3x3 image.  Input image:
  42. {2 2 2} {2 2 2} {3 3 3}
  43. {3 3 3} {4 4 4} {4 4 4}
  44. {5 5 5} {5 5 5} {6 6 6}
  45. Check completed! Encoded image:[[2, 2, 2] 2,[3, 3, 3] 2,[4, 4, 4] 2,[5, 5, 5] 2,[6, 6, 6] 1]
  46. Check completed! Encoded image:[[2, 2, 2] 2,[3, 3, 3] 2,[4, 4, 4] 2,[5, 5, 5] 2,[6, 6, 6] 1]
  47. Testing getWidth/getHeight on a 3x3 encoding.
  48. Good.
  49. Testing toPixImage() on a 3x3 encoding.
  50. Good.
  51. Testing setPixel() on a 3x3 encoding.
  52. Check completed! Encoded image:[[2, 2, 2] 2,[3, 3, 3] 1,[2, 2, 2] 1,[4, 4, 4] 2,[5, 5, 5] 2,[6, 6, 6] 1]
  53. Check completed! Encoded image:[[2, 2, 2] 2,[3, 3, 3] 1,[2, 2, 2] 1,[4, 4, 4] 2,[5, 5, 5] 2,[6, 6, 6] 1]
  54. Good.
  55. Testing setPixel() on a 3x3 encoding.
  56. Check completed! Encoded image:[[2, 2, 2] 4,[4, 4, 4] 2,[5, 5, 5] 2,[6, 6, 6] 1]
  57. Check completed! Encoded image:[[2, 2, 2] 4,[4, 4, 4] 2,[5, 5, 5] 2,[6, 6, 6] 1]
  58. Good.
  59. Testing one-parameter RunLengthEncoding constuctor on a 5x2 image.  Input image:
  60. {0 0 0} {1 1 1} {2 2 2} {3 3 3} {4 4 4}
  61. {5 5 5} {6 6 6} {7 7 7} {8 8 8} {9 9 9}
  62. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  63. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  64. Testing getWidth/getHeight on a 5x2 encoding.
  65. Good.
  66. Testing toPixImage() on a 5x2 encoding.
  67. Good.
  68. Testing setPixel() on a 5x2 encoding.
  69. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[6, 6, 6] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  70. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[6, 6, 6] 1,[5, 5, 5] 1,[6, 6, 6] 1,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  71. Good.
  72. Testing setPixel() on a 5x2 encoding.
  73. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[6, 6, 6] 3,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  74. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[6, 6, 6] 3,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  75. Good.
  76. Testing setPixel() on a 5x2 encoding.
  77. Check completed! Encoded image:[[1, 1, 1] 2,[2, 2, 2] 1,[3, 3, 3] 1,[6, 6, 6] 3,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  78. Check completed! Encoded image:[[1, 1, 1] 2,[2, 2, 2] 1,[3, 3, 3] 1,[6, 6, 6] 3,[7, 7, 7] 1,[8, 8, 8] 1,[9, 9, 9] 1]
  79. Good.
  80. Testing one-parameter RunLengthEncoding constuctor on a 3x2 image.  Input image:
  81. {0 0 0} {1 1 1} {2 2 2}
  82. {3 3 3} {4 4 4} {5 5 5}
  83. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  84. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[2, 2, 2] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  85. Testing getWidth/getHeight on a 3x2 encoding.
  86. Good.
  87. Testing toPixImage() on a 3x2 encoding.
  88. Good.
  89. Testing setPixel() on a 3x2 encoding.
  90. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[0, 0, 0] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  91. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[0, 0, 0] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  92. Good.
  93. Testing setPixel() on a 3x2 encoding.
  94. Check completed! Encoded image:[[0, 0, 0] 3,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  95. Check completed! Encoded image:[[0, 0, 0] 3,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  96. Good.
  97. Testing setPixel() on a 3x2 encoding.
  98. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[0, 0, 0] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  99. Check completed! Encoded image:[[0, 0, 0] 1,[1, 1, 1] 1,[0, 0, 0] 1,[3, 3, 3] 1,[4, 4, 4] 1,[5, 5, 5] 1]
  100. Good.
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表