(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==<font size= 6>Discussion for Lab 3</font size>==
+
 
 +
==<font size= 6>Discussion for Lab 3, [[ECE637]], Spring 2013</font size>==
 
==Additional Information ==
 
==Additional Information ==
 
Information for Segmentation
 
Information for Segmentation
Line 14: Line 15:
 
:A - ANSWER HERE  -->
 
:A - ANSWER HERE  -->
 
;'''Q: How do you return the struct pixel c[4] as an output of the ConnectedNeighbors routine, when the function is type void and the variable isn't passed in as a pointer?
 
;'''Q: How do you return the struct pixel c[4] as an output of the ConnectedNeighbors routine, when the function is type void and the variable isn't passed in as a pointer?
:A: I would say the example has nothing needed to be returned. The struct is made like a linked list with pointers to neighbors. However, you could rewrite the structure anyway you want and make it work, too. This could involve in passing the address to make the actual component and push and pop the pixels from the original image.
+
:A I would say the example has nothing needed to be returned. The struct is made like a linked list with pointers to neighbors. However, you could rewrite the structure anyway you want and make it work, too. This could involve in passing the address to make the actual component and push and pop the pixels from the original image.
 +
 
 +
;'''Q: My Question is regarding the Algorithm we follow to implement the function "ConnectedSet". What we are doing is pushing a pixel in a list, then when we pop that out, we are making the corresponding index in the array Y[i][j] = ClassLabel. Instead of setting Y = ClassLabel while popping a pixel out, why don't we make Y[i][j] = ClassLabel immediately after pushing a pixel into the list, that would make the problem of pushing a pixel in the list much easier.(atleast for me :)
 +
:A - Long in short, there are many ways to solve the problem. As long as you have your runtime (including algorithms) and termination condition correct, you should do just fine. The lab is merely a pseudo example of what you can do.
 +
 
 +
;'''Q: I do get seg[i][j] which contains 0 or 1. My question is that how to print it out as an image.
 +
:A - In general: You have choices based on your image range. Imagesc() takes in value between 0-1 while image() takes values 0-255. There could be more!
 +
 
 +
;'''Q: How do I make a linked list?
 +
:A - A simple example is provided in http://www.cprogramming.com/tutorial/lesson15.html
 +
 
 +
 
 
----
 
----
 
[[2013_Spring_Image_Processing_ECE_637_Bouman|Back to Spring 2013 ECE637]]
 
[[2013_Spring_Image_Processing_ECE_637_Bouman|Back to Spring 2013 ECE637]]
 
[[Category:Image ProcessingECE 637Spring2013Bouman]]
 
[[Category:Image ProcessingECE 637Spring2013Bouman]]
 
[[Category:ECE637]]
 
[[Category:ECE637]]
 +
[[Category:image processing]]
 +
[[category:discussion]]

Latest revision as of 08:10, 9 April 2013

Discussion for Lab 3, ECE637, Spring 2013

Additional Information

Information for Segmentation

Information for memory management

Q&A Section


Q: How do you return the struct pixel c[4] as an output of the ConnectedNeighbors routine, when the function is type void and the variable isn't passed in as a pointer?
A - I would say the example has nothing needed to be returned. The struct is made like a linked list with pointers to neighbors. However, you could rewrite the structure anyway you want and make it work, too. This could involve in passing the address to make the actual component and push and pop the pixels from the original image.
Q: My Question is regarding the Algorithm we follow to implement the function "ConnectedSet". What we are doing is pushing a pixel in a list, then when we pop that out, we are making the corresponding index in the array Y[i][j] = ClassLabel. Instead of setting Y = ClassLabel while popping a pixel out, why don't we make Y[i][j] = ClassLabel immediately after pushing a pixel into the list, that would make the problem of pushing a pixel in the list much easier.(atleast for me :)
A - Long in short, there are many ways to solve the problem. As long as you have your runtime (including algorithms) and termination condition correct, you should do just fine. The lab is merely a pseudo example of what you can do.
Q: I do get seg[i][j] which contains 0 or 1. My question is that how to print it out as an image.
A - In general: You have choices based on your image range. Imagesc() takes in value between 0-1 while image() takes values 0-255. There could be more!
Q: How do I make a linked list?
A - A simple example is provided in http://www.cprogramming.com/tutorial/lesson15.html



Back to Spring 2013 ECE637

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood